From 30f1d61cc5f77dc61f8252023fb50106a0e1e5ea Mon Sep 17 00:00:00 2001 From: Naomi Date: Wed, 7 Jun 2023 11:55:38 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=20=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=E4=BB=A3=E7=A0=81=E6=A0=BC=E5=BC=8F=E5=8C=96=20(#167)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 优化 项目编辑器格式配置 Signed-off-by: Naomi * 优化 ci触发规则 Signed-off-by: Naomi * 优化 项目代码格式化 Signed-off-by: Naomi --------- Signed-off-by: Naomi --- .editorconfig | 15 + .github/ISSUE_TEMPLATE/FEATURE-REQUEST.yml | 2 +- .github/ISSUE_TEMPLATE/MIGRATION-REQUEST.yml | 2 +- .github/workflows/android.yml | 10 +- app/src/main/AndroidManifest.xml | 354 ++- .../java/com/sevtinge/cemiuiler/XposedInit.kt | 4 +- .../sevtinge/cemiuiler/data/LocationData.java | 17 +- .../data/adapter/AppDataAdapter.java | 9 +- .../com/sevtinge/cemiuiler/module/Aireco.java | 10 +- .../sevtinge/cemiuiler/module/Browser.java | 3 +- .../com/sevtinge/cemiuiler/module/Camera.java | 58 +- .../cemiuiler/module/ContentExtension.java | 15 +- .../sevtinge/cemiuiler/module/Gallery.java | 12 +- .../cemiuiler/module/GlobalActions.java | 39 +- .../cemiuiler/module/GuardProvider.java | 5 +- .../com/sevtinge/cemiuiler/module/Home.java | 120 +- .../sevtinge/cemiuiler/module/InCallUi.java | 9 +- .../com/sevtinge/cemiuiler/module/Joyose.java | 4 +- .../com/sevtinge/cemiuiler/module/Lbe.java | 2 +- .../com/sevtinge/cemiuiler/module/Market.java | 4 +- .../cemiuiler/module/MediaEditor.java | 14 +- .../sevtinge/cemiuiler/module/MiShare.java | 6 +- .../cemiuiler/module/MiWallpaper.java | 2 +- .../com/sevtinge/cemiuiler/module/Mtb.java | 5 +- .../com/sevtinge/cemiuiler/module/Music.java | 8 +- .../cemiuiler/module/PackageInstaller.java | 28 +- .../cemiuiler/module/PersonalAssistant.java | 2 - .../com/sevtinge/cemiuiler/module/Phone.java | 10 +- .../sevtinge/cemiuiler/module/Scanner.java | 5 +- .../cemiuiler/module/ScreenRecorder.java | 6 +- .../cemiuiler/module/SecurityCenter.java | 45 +- .../sevtinge/cemiuiler/module/Settings.java | 3 +- .../cemiuiler/module/SystemFramework.java | 60 +- .../module/SystemFrameworkForCorePatch.java | 23 +- .../cemiuiler/module/SystemSettings.java | 15 +- .../sevtinge/cemiuiler/module/SystemUI.java | 137 +- .../cemiuiler/module/ThemeManager.java | 15 +- .../sevtinge/cemiuiler/module/Updater.java | 10 +- .../sevtinge/cemiuiler/module/Various.java | 27 +- .../cemiuiler/module/VoiceAssist.java | 3 +- .../cemiuiler/module/aireco/DeviceModify.java | 6 +- .../cemiuiler/module/base/BaseHook.java | 2 +- .../cemiuiler/module/base/BaseModule.java | 3 +- .../cemiuiler/module/base/BaseXposedInit.java | 19 +- .../cemiuiler/module/base/IXposedHook.java | 2 - .../module/browser/BrowserDexKit.java | 30 +- .../cemiuiler/module/browser/DebugMode.java | 16 +- .../module/camera/EnableLabOptions.kt | 3 +- .../cemiuiler/module/camera/UnlockCvlens.java | 1 - .../module/clock/EnableHourGlass.java | 26 +- .../module/contentextension/DoublePress.kt | 6 +- .../module/contentextension/LinkOpenMode.java | 4 +- .../module/contentextension/SuperImage.kt | 4 +- .../UseThirdPartyBrowser.java | 8 +- .../module/fileexplorer/SelectName.kt | 14 +- .../module/gallery/EnableHdrEnhance.java | 3 +- .../module/gallery/EnableIdPhoto.java | 43 +- .../module/gallery/EnableMagicMatting.java | 19 +- .../module/gallery/EnableMagicSky.java | 1 + .../cemiuiler/module/gallery/EnableOcr.java | 1 + .../module/gallery/EnableOcrForm.java | 19 +- .../cemiuiler/module/gallery/EnablePdf.java | 1 + .../module/gallery/EnablePhotoMovie.java | 31 +- .../module/gallery/EnableRemover2.java | 1 + .../module/gallery/EnableTextYanhua.java | 1 + .../module/gallery/EnableVideoEditor.java | 31 +- .../module/gallery/EnableVideoPost.java | 19 +- .../guardprovider/DisableUploadAppList.java | 3 +- .../guardprovider/GuardProviderDexKit.java | 21 +- .../cemiuiler/module/home/DoubleTap.java | 10 +- .../module/home/FreeFormCountForHome.java | 8 +- .../module/home/HomePortraitReverse.java | 2 +- .../cemiuiler/module/home/HotSeatSwipe.java | 9 +- .../cemiuiler/module/home/ScreenSwipe.java | 37 +- .../cemiuiler/module/home/SeekPoints.java | 16 +- .../cemiuiler/module/home/SetDeviceLevel.kt | 4 +- .../cemiuiler/module/home/ShakeDevice.java | 12 +- .../module/home/dock/DockCustom.java | 8 +- .../module/home/dock/FoldDeviceDock.kt | 6 +- .../cemiuiler/module/home/dock/FoldDock.java | 14 +- .../module/home/dock/HideSeekPoint.kt | 4 +- .../home/drawer/AllAppsContainerViewBlur.kt | 4 +- .../cemiuiler/module/home/drawer/AppDrawer.kt | 20 +- .../module/home/folder/FolderAnimation.kt | 4 +- .../module/home/folder/FolderBlur.kt | 9 +- .../module/home/folder/FolderColumns.kt | 7 +- .../module/home/folder/FolderShade.java | 20 +- .../module/home/layout/HotSeatsHeight.java | 2 +- .../home/layout/HotSeatsMarginBottom.java | 2 +- .../module/home/layout/UnlockGrids.java | 10 +- .../module/home/other/AlwaysBlurWallpaper.kt | 2 +- .../home/other/AlwaysShowStatusClock.kt | 2 +- .../home/other/BlurWhenShowShortcutMenu.kt | 73 +- .../module/home/other/DisableHideGoogle.kt | 4 +- .../home/other/FreeformShortcutMenu.java | 8 +- .../cemiuiler/module/home/other/HomeMode.java | 2 +- .../module/home/other/InfiniteScroll.java | 6 +- .../module/home/other/OverlapMode.kt | 6 +- .../home/other/ShortcutBackgroundBlur.kt | 4 +- .../cemiuiler/module/home/recent/BlurLevel.kt | 4 +- .../DisableRecentViewWallpaperDarken.kt | 4 +- .../module/home/recent/RealMemory.kt | 10 +- .../module/home/recent/RecentResource.kt | 4 +- .../module/home/recent/RemoveCardAnim.kt | 19 +- .../module/home/recent/TaskViewHorizontal.kt | 6 +- .../module/home/recent/TaskViewVertical.kt | 5 +- .../module/home/title/BigIconCorner.kt | 18 +- .../module/home/title/EnableIconMonetColor.kt | 7 +- .../home/title/EnableIconMonoChrome.java | 19 +- .../module/home/title/FixAnimation.java | 5 +- .../module/home/title/IconScaleHook.java | 28 +- .../module/home/title/IconTitleColor.kt | 8 +- .../home/title/LargeIconCornerRadius.java | 8 +- .../module/home/title/TitleFontSize.java | 2 +- .../module/home/title/TitleMarquee.java | 4 +- .../home/widget/AllWidgetAnimation.java | 1 + .../home/widget/AllowMoveAllWidgetToMinus.kt | 2 +- .../home/widget/AlwaysShowMiuiWidget.kt | 4 +- .../cemiuiler/module/incallui/HideCrbt.java | 2 - .../module/joyose/DisableCloudControl.java | 11 +- .../module/joyose/EnableGpuTuner.java | 11 +- .../cemiuiler/module/joyose/JoyoseDexKit.java | 23 +- .../module/lbe/DisableClipboardTip.kt | 25 +- .../cemiuiler/module/market/DeviceModify.java | 18 +- .../cemiuiler/module/market/MarketDexKit.java | 23 +- .../cemiuiler/module/market/NewIcon.java | 14 +- .../module/mediaeditor/MediaEditorDexKit.java | 12 +- .../mediaeditor/UnlockMinimumCropLimit.java | 18 +- .../module/milink/UnlockMiShare.java | 1 + .../module/mirror/UnlockMiuiPlus.java | 2 + .../module/misettings/CustomRefreshRate.java | 1 + .../module/mishare/DisableMishareAutoOff.java | 13 +- .../module/mishare/MiShareDexKit.java | 25 +- .../miwallpaper/UnlockSuperWallpaper.java | 2 + .../cemiuiler/module/mms/DisableAd.java | 13 +- .../cemiuiler/module/mms/MmsDexKit.java | 20 +- .../cemiuiler/module/music/DisableAd.java | 4 +- .../module/packageinstaller/DisableAD.java | 20 +- .../DisableCountChecking.java | 1 + .../packageinstaller/DisplayMoreApkInfo.java | 8 +- .../packageinstaller/DisplayMoreApkInfoNew.kt | 18 +- .../packageinstaller/InstallRiskDisable.java | 26 +- .../packageinstaller/InstallSource.java | 4 +- .../MiuiPackageInstallModify.java | 4 +- .../PackageInstallerDexKit.java | 27 +- .../module/packageinstaller/SafeMode.java | 6 +- .../packageinstaller/UpdateSystemApp.java | 23 +- .../BlurPersonalAssistant.kt | 6 +- .../personalassistant/EnableFoldWidget.java | 3 +- .../personalassistant/PadWidgetEnable.java | 6 +- .../module/personalassistant/WidgetCrack.kt | 41 +- .../cemiuiler/module/scanner/EnableCard.java | 30 +- .../module/scanner/EnableDocPpt.java | 18 +- .../cemiuiler/module/scanner/EnableOcr.java | 18 +- .../module/scanner/EnableTranslation.java | 30 +- .../scanner/document/EnableDocument.java | 18 +- .../module/scanner/document/EnableExcel.java | 42 +- .../ForceSupportPlaybackCapture.kt | 6 +- .../screenrecorder/ScreenRecorderConfig.kt | 26 +- .../screenrecorder/ScreenRecorderDexKit.java | 21 +- .../screenrecorder/UnlockMoreVolumeFrom.java | 1 + .../module/screenshot/SaveToPictures.kt | 4 +- .../screenshot/UnlockMinimumCropLimit.java | 1 + .../securitycenter/AppLockPinScramble.java | 6 +- .../module/securitycenter/BlurSecurity.kt | 6 +- .../module/securitycenter/DisableReport.java | 2 +- .../securitycenter/DisableRootCheck.java | 12 +- .../module/securitycenter/FuckRiskPkg.kt | 8 +- .../securitycenter/LockOneHundredPoints.java | 16 +- .../module/securitycenter/NewBoxBlur.java | 2 +- ...veConversationBubbleSettingsRestriction.kt | 6 +- .../securitycenter/SecurityCenterDexKit.java | 53 +- .../ShowBatteryTemperature.java | 10 +- .../ShowBatteryTemperatureNew.kt | 33 +- .../securitycenter/SidebarLineCustom.kt | 4 +- .../securitycenter/SkipCountDownLimit.java | 2 +- .../UnlockSuperWirelessCharge.java | 20 +- .../securitycenter/app/AppDefaultSort.java | 6 +- .../module/securitycenter/app/AppDetails.java | 154 +- .../module/securitycenter/app/AppDisable.java | 14 +- .../securitycenter/app/AppRestrict.java | 2 +- .../securitycenter/beauty/BeautyFace.java | 15 +- .../securitycenter/beauty/BeautyLight.java | 12 +- .../beauty/BeautyLightAuto.java | 15 +- .../securitycenter/beauty/BeautyPc.java | 15 +- .../securitycenter/beauty/BeautyPrivacy.java | 10 +- .../securitycenter/lab/AiClipboardEnable.java | 8 +- .../lab/BlurLocationEnable.java | 14 +- .../securitycenter/lab/GetNumberEnable.java | 11 +- .../module/settings/CemiuilerSettings.java | 10 +- .../settings/NotificationImportance.java | 11 +- .../VolumeSeparateControlForSettings.java | 2 +- .../systemframework/AllowUninstall.java | 66 +- .../systemframework/AllowUntrustedTouch.java | 2 +- .../systemframework/AppDisableService.java | 4 +- .../module/systemframework/AppLinkVerify.java | 15 +- .../systemframework/BackgroundBlurDrawable.kt | 4 +- .../module/systemframework/CleanOpenMenu.java | 60 +- .../systemframework/CleanShareMenu.java | 11 +- .../module/systemframework/DisableCleaner.kt | 36 +- .../DisableFreeformBlackList.java | 8 +- .../module/systemframework/FlagSecure.java | 25 +- .../module/systemframework/IsDetailLog.java | 4 +- .../systemframework/MultiFreeFormSupported.kt | 8 +- .../systemframework/PackagePermissions.java | 14 +- .../RemoveSmallWindowRestrictions.kt | 10 +- .../StickyFloatingWindows.java | 62 +- .../systemframework/VolumeDisableSafe.java | 1 + .../systemframework/VolumeFirstPress.java | 4 +- .../systemframework/VolumeMediaSteps.kt | 6 +- .../VolumeSeparateControl.java | 10 +- .../module/systemframework/VolumeSteps.java | 4 +- .../corepatch/BypassSignCheckForT.kt | 6 +- .../corepatch/CorePatchForR.java | 32 +- .../corepatch/CorePatchForS.java | 8 +- .../corepatch/CorePatchForSv2.java | 6 +- .../corepatch/CorePatchForT.java | 23 +- .../systemsettings/AddMiuiPlusEntry.java | 19 +- .../systemsettings/EnableSpeedMode.java | 18 +- .../systemsettings/InternationalBuild.java | 4 +- .../systemsettings/PermissionTopOfApp.kt | 13 +- .../systemsettings/ViewWifiPasswordHook.java | 4 +- .../VoipAssistantController.java | 18 +- .../systemsettings/aiimage/UnlockAi.java | 3 +- .../systemsettings/aiimage/UnlockMemc.java | 1 - .../module/systemui/BatteryIndicator.java | 29 +- .../module/systemui/BluetoothRestrict.java | 6 +- .../module/systemui/ChargeAnimationStyle.java | 8 +- .../module/systemui/ClockCenterHook.java | 83 +- .../module/systemui/MiuiGxzwSize.java | 3 - .../module/systemui/MonetThemeOverlay.java | 2 +- .../module/systemui/NotificationFreeform.java | 2 +- .../systemui/OriginChargeAnimation.java | 2 - .../module/systemui/QSLabelsHook.java | 4 +- .../module/systemui/StatusBarActions.java | 17 +- .../controlcenter/CompactNotificationsHook.kt | 4 +- .../MuteVisibleNotifications.java | 14 +- .../controlcenter/NotificationWeather.kt | 22 +- .../controlcenter/NotificationWeatherNew.kt | 54 +- .../controlcenter/NotificationWeatherOld.kt | 6 +- .../QSControlDetailBackgroundAlpha.kt | 19 +- .../systemui/controlcenter/QSFiveGTile.java | 4 +- .../module/systemui/controlcenter/QSGrid.java | 3 +- .../systemui/controlcenter/QSGridLabels.java | 24 +- .../systemui/display/AutoBrightness.java | 3 +- .../lockscreen/AddBlurEffectToLockScreen.kt | 8 +- .../module/systemui/lockscreen/BlurButton.kt | 5 +- .../module/systemui/lockscreen/ChargingCVP.kt | 16 +- .../lockscreen/ClockDisplaySeconds.kt | 10 +- .../systemui/lockscreen/RemoveCamera.kt | 8 +- .../systemui/lockscreen/ScramblePIN.java | 2 +- .../systemui/navigation/HandleLineCustom.kt | 8 +- .../systemui/navigation/NavigationCustom.java | 2 +- .../systemui/plugin/EnableVolumeBlur.java | 2 - .../module/systemui/plugin/PluginHelper.java | 2 - .../statusbar/BigMobileNetworkType.java | 54 +- .../systemui/statusbar/BluetoothIcon.java | 4 +- .../statusbar/DisplayHardwareDetail.java | 38 +- .../systemui/statusbar/DualRowSignalHook.java | 41 +- .../systemui/statusbar/HideBatteryIcon.kt | 10 +- .../systemui/statusbar/MobileNetwork.java | 10 +- .../statusbar/MobileTypeSingleHook.java | 20 +- .../statusbar/NotificationIconColumns.kt | 25 +- .../SelectiveHideIconForAlarmClock.java | 3 +- .../systemui/statusbar/StatusBarIcon.java | 44 +- .../StatusBarIconPositionAdjust.java | 3 +- .../statusbar/clock/TimeCustomization.kt | 31 +- .../systemui/statusbar/clock/TimeStyle.kt | 8 +- .../statusbar/layout/StatusBarLayout.kt | 72 +- .../statusbar/network/NetworkSpeed.kt | 29 +- .../statusbar/network/NetworkSpeedSec.kt | 4 +- .../statusbar/network/NetworkSpeedSpacing.kt | 30 +- .../statusbar/network/NetworkSpeedUnit.kt | 16 +- .../network/StatusBarNoNetSpeedSep.kt | 9 +- .../statusbar/network/s/NetworkSpeedWidth.kt | 4 +- .../module/thememanager/DisableThemeAd.java | 4 +- .../module/thememanager/DisableThemeAdNew.kt | 4 +- .../module/thememanager/EnableFoldTheme.java | 2 +- .../module/thememanager/EnablePadTheme.java | 3 +- .../module/thememanager/ThemeCrack.java | 44 +- .../module/thememanager/ThemeCrackNew.kt | 4 +- .../thememanager/ThemeManagerDexKit.java | 23 +- .../cemiuiler/module/tsmclient/AutoNfc.kt | 22 +- .../cemiuiler/module/updater/DeviceModify.kt | 3 +- .../module/updater/UpdaterDexKit.java | 21 +- .../module/updater/VersionCodeModify.java | 4 +- .../cemiuiler/module/various/DialogBlur.java | 2 +- .../module/various/DialogCustom.java | 5 +- .../module/various/DialogGravity.java | 24 +- .../module/various/MiuiAppNoOverScroll.java | 2 +- .../module/various/NotificationBlur.java | 20 +- .../cemiuiler/module/various/UnlockIme.kt | 14 +- .../voiceassist/UseThirdPartyBrowser.java | 24 +- .../module/voiceassist/VoiceAssistDexKit.java | 21 +- .../module/weather/SetDeviceLevel.java | 12 +- .../cemiuiler/prefs/SeekBarPreferenceEx.java | 18 +- .../provider/SharedPrefsProvider.java | 4 +- .../cemiuiler/titles/HighBrightnessMode.kt | 2 +- .../sevtinge/cemiuiler/ui/AboutActivity.kt | 18 +- .../ui/AboutContributerActivity.java | 21 +- .../cemiuiler/ui/AboutUseActivity.java | 1 + .../sevtinge/cemiuiler/ui/AiAsstActivity.java | 1 + .../sevtinge/cemiuiler/ui/AirecoActivity.java | 21 +- .../sevtinge/cemiuiler/ui/CameraActivity.java | 1 + .../sevtinge/cemiuiler/ui/ClockActivity.java | 1 + .../ui/ContentExtensionActivity.java | 21 +- .../cemiuiler/ui/DownloadsActivity.java | 1 + .../cemiuiler/ui/GalleryActivity.java | 1 + .../cemiuiler/ui/GuardProviderActivity.java | 1 + .../cemiuiler/ui/HideAppActivity.java | 3 +- .../cemiuiler/ui/InCallUiActivity.java | 21 +- .../sevtinge/cemiuiler/ui/JoyoseActivity.java | 1 + .../sevtinge/cemiuiler/ui/LbeActivity.java | 1 + .../sevtinge/cemiuiler/ui/MainActivity.java | 9 +- .../sevtinge/cemiuiler/ui/MarketActivity.java | 21 +- .../cemiuiler/ui/MediaEditorActivity.java | 23 +- .../sevtinge/cemiuiler/ui/MiLinkActivity.java | 1 + .../cemiuiler/ui/MiShareActivity.java | 1 + .../cemiuiler/ui/MiWallpaperActivity.java | 1 + .../sevtinge/cemiuiler/ui/MirrorActivity.java | 1 + .../sevtinge/cemiuiler/ui/MmsActivity.java | 1 + .../sevtinge/cemiuiler/ui/MtbActivity.java | 3 +- .../sevtinge/cemiuiler/ui/MusicActivity.java | 21 +- .../ui/PersonalAssistantActivity.java | 2 +- .../sevtinge/cemiuiler/ui/PhoneActivity.java | 3 +- .../cemiuiler/ui/PowerKeeperActivity.java | 23 +- .../cemiuiler/ui/ScannerActivity.java | 1 + .../cemiuiler/ui/ScreenRecorderActivity.java | 1 + .../cemiuiler/ui/ScreenShotActivity.java | 21 +- .../cemiuiler/ui/SecurityCenterActivity.java | 4 +- .../cemiuiler/ui/SettingsActivity.java | 2 +- .../cemiuiler/ui/SystemFrameworkActivity.java | 3 - .../cemiuiler/ui/SystemSettingsActivity.java | 6 +- .../cemiuiler/ui/SystemUIPluginActivity.java | 1 + .../cemiuiler/ui/TsmClientActivity.java | 21 +- .../cemiuiler/ui/UpdaterActivity.java | 1 + .../cemiuiler/ui/VariousActivity.java | 2 +- .../cemiuiler/ui/WeatherActivity.java | 21 +- .../ui/base/BaseAppCompatActivity.java | 74 +- .../ui/base/BasePreferenceFragment.java | 1 - .../cemiuiler/ui/base/SubFragment.java | 6 +- .../cemiuiler/ui/home/HomeDockActivity.java | 4 - .../cemiuiler/ui/home/HomeDrawerActivity.java | 4 +- .../cemiuiler/ui/home/HomeFolderActivity.java | 5 +- .../cemiuiler/ui/home/HomeOtherActivity.java | 2 +- .../cemiuiler/ui/home/HomeRecentActivity.java | 1 + .../cemiuiler/ui/home/HomeTitleActivity.java | 1 + .../ui/main/fragment/MainFragment.java | 2 +- .../cemiuiler/ui/sub/AppPickerFragment.java | 39 +- .../ui/sub/CustomBackgroundSettings.java | 11 +- .../cemiuiler/ui/sub/MultiAction.java | 34 +- .../ui/systemframework/FreeFormSettings.java | 6 +- .../ui/systemframework/NetworkSettings.java | 1 + .../ui/systemframework/OtherSettings.java | 59 +- .../ui/systemframework/VolumeSettings.java | 2 +- .../ui/systemui/ControlCenterActivity.java | 8 +- .../ui/systemui/DisplayActivity.java | 92 +- .../ui/systemui/NavigationActivity.java | 2 +- .../cemiuiler/ui/systemui/OtherActivity.java | 4 +- .../ui/systemui/StatusBarActivity.java | 2 +- .../statusbar/BatteryIndicatorActivity.java | 2 - .../statusbar/ClockIndicatorActivity.java | 4 +- .../statusbar/DoubleLineNetworkActivity.java | 3 +- .../statusbar/IconManageActivity.java | 6 +- .../statusbar/MobileNetworkTypeActivity.java | 3 +- .../ui/various/LocationDataActivity.java | 22 +- .../ui/various/VariousDialogActivity.java | 2 +- .../ui/various/VariousThemeActivity.java | 3 +- .../ui/various/fragment/VariousFragment.java | 10 +- .../cemiuiler/utils/ALPermissionManager.java | 6 +- .../sevtinge/cemiuiler/utils/AppRegister.kt | 9 +- .../com/sevtinge/cemiuiler/utils/AppUtils.kt | 16 +- .../sevtinge/cemiuiler/utils/BlurUtils.java | 22 +- .../sevtinge/cemiuiler/utils/ColorUtils.kt | 5 +- .../cemiuiler/utils/ColorUtilsStatic.java | 26 +- .../cemiuiler/utils/DialogHelper.java | 28 +- .../cemiuiler/utils/DisplayUtils.java | 15 +- .../com/sevtinge/cemiuiler/utils/Helpers.java | 37 +- .../cemiuiler/utils/KotlinXposedHelper.kt | 10 +- .../sevtinge/cemiuiler/utils/LogUtils.java | 11 +- .../cemiuiler/utils/LogcatHelper.java | 8 +- .../com/sevtinge/cemiuiler/utils/ModData.java | 22 +- .../sevtinge/cemiuiler/utils/PrefsMap.java | 58 +- .../sevtinge/cemiuiler/utils/PrefsUtils.java | 50 +- .../sevtinge/cemiuiler/utils/SdkHelper.java | 16 +- .../cemiuiler/utils/ShakeManager.java | 6 +- .../sevtinge/cemiuiler/utils/ShellUtils.java | 58 +- .../cemiuiler/utils/SystemProperties.kt | 6 +- .../cemiuiler/utils/api/VoyagerApis.kt | 8 +- .../cemiuiler/view/BatteryIndicatorView.java | 35 +- .../cemiuiler/view/BlurFrameLayout.java | 16 +- .../cemiuiler/view/BubbleSeekBar.java | 108 +- .../cemiuiler/view/CircleImageView.java | 3 +- .../view/CustomMultipleChoiceView.java | 37 +- .../sevtinge/cemiuiler/view/SpinnerEx.java | 2 +- .../sevtinge/cemiuiler/view/WeatherData.kt | 17 +- .../sevtinge/cemiuiler/view/WeatherView.kt | 14 +- .../res/animator/fragment_close_enter.xml | 4 +- .../main/res/animator/fragment_close_exit.xml | 4 +- .../main/res/animator/fragment_open_enter.xml | 4 +- .../main/res/animator/fragment_open_exit.xml | 4 +- .../drawable-v31/ic_launcher_foreground.xml | 22 +- .../main/res/drawable/bubble_bar_pop_bg.xml | 3 +- app/src/main/res/drawable/ic_audio_system.xml | 22 +- .../ic_big_folder_2x1_select_border_bg.xml | 78 +- ...c_big_folder_2x1_select_border_bg_dark.xml | 12 +- .../ic_big_folder_select_border_bg.xml | 78 +- .../ic_big_folder_select_border_bg_dark.xml | 104 +- .../drawable/ic_cemiuiler_settings_v130.xml | 7 +- .../drawable/ic_cemiuiler_settings_v140.xml | 8 +- .../ic_control_center_5g_toggle_off.xml | 2 +- .../ic_control_center_5g_toggle_on.xml | 2 +- .../res/drawable/ic_launcher_foreground.xml | 22 +- .../ic_packageinstaller_background_dark.xml | 2 +- .../ic_packageinstaller_background_light.xml | 2 +- .../res/drawable/ic_qs_tile_bg_disabled.xml | 2 +- .../res/drawable/ic_qs_tile_bg_enabled.xml | 2 +- .../res/drawable/ic_qs_tile_bg_warning.xml | 2 +- app/src/main/res/drawable/ic_reboot_small.xml | 6 +- app/src/main/res/drawable/ic_small_window.xml | 30 +- .../res/drawable/statusbar_signal_1_0.xml | 32 +- .../drawable/statusbar_signal_1_0_dark.xml | 32 +- .../statusbar_signal_1_0_dark_thick.xml | 32 +- .../drawable/statusbar_signal_1_0_thick.xml | 32 +- .../drawable/statusbar_signal_1_0_tint.xml | 32 +- .../statusbar_signal_1_0_tint_thick.xml | 32 +- .../res/drawable/statusbar_signal_1_1.xml | 32 +- .../drawable/statusbar_signal_1_1_dark.xml | 32 +- .../statusbar_signal_1_1_dark_thick.xml | 32 +- .../drawable/statusbar_signal_1_1_thick.xml | 32 +- .../drawable/statusbar_signal_1_1_tint.xml | 32 +- .../statusbar_signal_1_1_tint_thick.xml | 32 +- .../res/drawable/statusbar_signal_1_2.xml | 32 +- .../drawable/statusbar_signal_1_2_dark.xml | 32 +- .../statusbar_signal_1_2_dark_thick.xml | 32 +- .../drawable/statusbar_signal_1_2_thick.xml | 32 +- .../drawable/statusbar_signal_1_2_tint.xml | 32 +- .../statusbar_signal_1_2_tint_thick.xml | 32 +- .../res/drawable/statusbar_signal_1_3.xml | 32 +- .../drawable/statusbar_signal_1_3_dark.xml | 32 +- .../statusbar_signal_1_3_dark_thick.xml | 32 +- .../drawable/statusbar_signal_1_3_thick.xml | 32 +- .../drawable/statusbar_signal_1_3_tint.xml | 32 +- .../statusbar_signal_1_3_tint_thick.xml | 32 +- .../res/drawable/statusbar_signal_1_4.xml | 32 +- .../drawable/statusbar_signal_1_4_dark.xml | 32 +- .../statusbar_signal_1_4_dark_thick.xml | 32 +- .../drawable/statusbar_signal_1_4_thick.xml | 32 +- .../drawable/statusbar_signal_1_4_tint.xml | 32 +- .../statusbar_signal_1_4_tint_thick.xml | 32 +- .../res/drawable/statusbar_signal_1_5.xml | 32 +- .../drawable/statusbar_signal_1_5_dark.xml | 32 +- .../statusbar_signal_1_5_dark_thick.xml | 32 +- .../drawable/statusbar_signal_1_5_thick.xml | 32 +- .../drawable/statusbar_signal_1_5_tint.xml | 32 +- .../statusbar_signal_1_5_tint_thick.xml | 32 +- .../res/drawable/statusbar_signal_2_0.xml | 34 +- .../drawable/statusbar_signal_2_0_dark.xml | 34 +- .../statusbar_signal_2_0_dark_thick.xml | 34 +- .../drawable/statusbar_signal_2_0_thick.xml | 34 +- .../drawable/statusbar_signal_2_0_tint.xml | 34 +- .../statusbar_signal_2_0_tint_thick.xml | 34 +- .../res/drawable/statusbar_signal_2_1.xml | 34 +- .../drawable/statusbar_signal_2_1_dark.xml | 34 +- .../statusbar_signal_2_1_dark_thick.xml | 34 +- .../drawable/statusbar_signal_2_1_thick.xml | 34 +- .../drawable/statusbar_signal_2_1_tint.xml | 34 +- .../statusbar_signal_2_1_tint_thick.xml | 34 +- .../res/drawable/statusbar_signal_2_2.xml | 34 +- .../drawable/statusbar_signal_2_2_dark.xml | 34 +- .../statusbar_signal_2_2_dark_thick.xml | 34 +- .../drawable/statusbar_signal_2_2_thick.xml | 34 +- .../drawable/statusbar_signal_2_2_tint.xml | 34 +- .../statusbar_signal_2_2_tint_thick.xml | 34 +- .../res/drawable/statusbar_signal_2_3.xml | 34 +- .../drawable/statusbar_signal_2_3_dark.xml | 34 +- .../statusbar_signal_2_3_dark_thick.xml | 34 +- .../drawable/statusbar_signal_2_3_thick.xml | 34 +- .../drawable/statusbar_signal_2_3_tint.xml | 34 +- .../statusbar_signal_2_3_tint_thick.xml | 34 +- .../res/drawable/statusbar_signal_2_4.xml | 34 +- .../drawable/statusbar_signal_2_4_dark.xml | 34 +- .../statusbar_signal_2_4_dark_thick.xml | 34 +- .../drawable/statusbar_signal_2_4_thick.xml | 34 +- .../drawable/statusbar_signal_2_4_tint.xml | 34 +- .../statusbar_signal_2_4_tint_thick.xml | 34 +- .../res/drawable/statusbar_signal_2_5.xml | 34 +- .../drawable/statusbar_signal_2_5_dark.xml | 34 +- .../statusbar_signal_2_5_dark_thick.xml | 34 +- .../drawable/statusbar_signal_2_5_thick.xml | 34 +- .../drawable/statusbar_signal_2_5_tint.xml | 34 +- .../statusbar_signal_2_5_tint_thick.xml | 34 +- app/src/main/res/layout/action_bar_layout.xml | 4 +- app/src/main/res/layout/actionbar_layout.xml | 6 +- app/src/main/res/layout/activity_about.xml | 58 +- .../main/res/layout/activity_custom_hook.xml | 4 +- .../layout/activity_custom_hook_config.xml | 4 +- app/src/main/res/layout/activity_debug.xml | 2 +- app/src/main/res/layout/activity_location.xml | 2 +- .../main/res/layout/color_picker_dialog.xml | 4 +- .../res/layout/fragment_common_padded.xml | 3 +- app/src/main/res/layout/item_app_list.xml | 4 +- .../res/layout/preference_bubble_seekbar.xml | 2 +- .../preference_custom_blur_dark_mode.xml | 3 +- .../preference_custom_blur_light_mode.xml | 3 +- .../res/layout/preference_round_layout.xml | 118 +- .../main/res/layout/preference_seekbar_ex.xml | 142 +- .../layout/preference_seekbar_no_padding.xml | 12 +- .../main/res/layout/statusbar_text_icon.xml | 17 +- .../res/menu/menu_location_simulation.xml | 2 +- app/src/main/res/menu/menu_main.xml | 4 +- .../res/menu/menu_system_framework_other.xml | 4 +- .../res/mipmap-anydpi-v26/ic_launcher.xml | 4 +- app/src/main/res/values-en-rUS/strings.xml | 3 +- app/src/main/res/values-pt-rBR/strings.xml | 1976 ++++++++--------- app/src/main/res/values-tr/strings.xml | 2 +- app/src/main/res/values-vi/strings.xml | 104 +- app/src/main/res/values/attrs.xml | 2 +- app/src/main/res/values/strings.xml | 2 +- app/src/main/res/xml/aiasst.xml | 8 +- app/src/main/res/xml/aireco.xml | 6 +- app/src/main/res/xml/browser.xml | 8 +- app/src/main/res/xml/camera.xml | 290 +-- app/src/main/res/xml/downloads.xml | 10 +- app/src/main/res/xml/gallery.xml | 82 +- app/src/main/res/xml/guard_provider.xml | 8 +- app/src/main/res/xml/home.xml | 2 +- app/src/main/res/xml/home_dock.xml | 28 +- app/src/main/res/xml/home_drawer.xml | 8 +- app/src/main/res/xml/home_folder.xml | 272 +-- app/src/main/res/xml/home_gesture.xml | 16 +- app/src/main/res/xml/home_layout.xml | 158 +- app/src/main/res/xml/home_multi_action.xml | 22 +- app/src/main/res/xml/home_other.xml | 66 +- app/src/main/res/xml/home_recent.xml | 166 +- app/src/main/res/xml/home_title.xml | 84 +- app/src/main/res/xml/home_widget.xml | 20 +- app/src/main/res/xml/incallui.xml | 9 +- app/src/main/res/xml/joyose.xml | 16 +- app/src/main/res/xml/market.xml | 24 +- app/src/main/res/xml/mediaeditor.xml | 10 +- app/src/main/res/xml/mi_settings.xml | 8 +- app/src/main/res/xml/milink.xml | 8 +- app/src/main/res/xml/mirror.xml | 9 +- app/src/main/res/xml/mishare.xml | 8 +- app/src/main/res/xml/miwallpaper.xml | 8 +- app/src/main/res/xml/mms.xml | 10 +- app/src/main/res/xml/mtb.xml | 8 +- app/src/main/res/xml/music.xml | 9 +- app/src/main/res/xml/package_installer.xml | 20 +- app/src/main/res/xml/personal_assistant.xml | 11 +- app/src/main/res/xml/phone.xml | 14 +- app/src/main/res/xml/powerkeeper.xml | 20 +- app/src/main/res/xml/prefs_about.xml | 146 +- .../main/res/xml/prefs_about_contributer.xml | 87 +- app/src/main/res/xml/prefs_about_use.xml | 256 +-- app/src/main/res/xml/prefs_main.xml | 24 +- app/src/main/res/xml/prefs_settings.xml | 18 +- app/src/main/res/xml/scanner.xml | 48 +- app/src/main/res/xml/screenrecorder.xml | 28 +- app/src/main/res/xml/screenshot.xml | 10 +- app/src/main/res/xml/security_center.xml | 124 +- app/src/main/res/xml/settings_safe_mode.xml | 2 +- .../res/xml/system_framework_freeform.xml | 18 +- .../main/res/xml/system_framework_other.xml | 20 +- .../main/res/xml/system_framework_phone.xml | 40 +- .../main/res/xml/system_framework_volume.xml | 34 +- app/src/main/res/xml/system_settings.xml | 40 +- app/src/main/res/xml/system_ui.xml | 16 +- .../main/res/xml/system_ui_control_center.xml | 92 +- .../main/res/xml/system_ui_lock_screen.xml | 19 +- app/src/main/res/xml/system_ui_navigation.xml | 194 +- app/src/main/res/xml/system_ui_other.xml | 17 +- app/src/main/res/xml/system_ui_plugin.xml | 10 +- app/src/main/res/xml/system_ui_status_bar.xml | 36 +- ...system_ui_status_bar_battery_indicator.xml | 28 +- .../system_ui_status_bar_clock_indicator.xml | 2 +- ...ystem_ui_status_bar_doubleline_network.xml | 2 +- ...stem_ui_status_bar_mobile_network_type.xml | 2 +- app/src/main/res/xml/theme_manager.xml | 10 +- app/src/main/res/xml/tsmclient.xml | 10 +- app/src/main/res/xml/updater.xml | 26 +- app/src/main/res/xml/various.xml | 27 +- app/src/main/res/xml/various_background.xml | 12 +- app/src/main/res/xml/various_dialog.xml | 12 +- .../res/xml/various_location_simulation.xml | 8 +- app/src/main/res/xml/weather.xml | 6 +- .../drawable/BackgroundBlurDrawable.java | 3 +- 588 files changed, 7360 insertions(+), 6846 deletions(-) create mode 100644 .editorconfig diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000000..e5a234bcc1 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,15 @@ +root = true + +[*] +charset = utf-8 +end_of_line = lf +indent_size = 4 +indent_style = space +insert_final_newline = true +trim_trailing_whitespace = true + +[*.xml] +insert_final_newline = false + +[*.yml] +indent_size = 2 diff --git a/.github/ISSUE_TEMPLATE/FEATURE-REQUEST.yml b/.github/ISSUE_TEMPLATE/FEATURE-REQUEST.yml index f48b6aaed5..0b581fc532 100644 --- a/.github/ISSUE_TEMPLATE/FEATURE-REQUEST.yml +++ b/.github/ISSUE_TEMPLATE/FEATURE-REQUEST.yml @@ -9,7 +9,7 @@ body: id: requirement attributes: label: "需求内容" - description: "简单说明你的需求" + description: "简单说明你的需求" placeholder: 请添加... validations: required: true diff --git a/.github/ISSUE_TEMPLATE/MIGRATION-REQUEST.yml b/.github/ISSUE_TEMPLATE/MIGRATION-REQUEST.yml index f9a43af98a..407ddca4fb 100644 --- a/.github/ISSUE_TEMPLATE/MIGRATION-REQUEST.yml +++ b/.github/ISSUE_TEMPLATE/MIGRATION-REQUEST.yml @@ -17,7 +17,7 @@ body: id: requirement attributes: label: "移植内容" - description: "简单说明需要移植的内容" + description: "简单说明需要移植的内容" placeholder: 移植...软件的...功能 validations: required: true diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index 7615554866..15be671a37 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -1,13 +1,15 @@ name: Android Ci Release on: push: - branches: ["main"] + branches: [ "main" ] pull_request: - branches: ["main"] + branches: [ "main" ] paths-ignore: - - "README.md" - - "README_en-US.md" + - ".github/**" + - "!.github/workflows/**" + - ".idea/" - "doc/*" + - "*.md" jobs: build: runs-on: ubuntu-latest diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 2af186eb5a..8cbac8b884 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -1,9 +1,11 @@ - + - + @@ -11,161 +13,253 @@ - + - - - - - - - - - + + + + + + + - - + android:name=".Application" + android:icon="@mipmap/ic_launcher" + android:label="@string/app_name" + android:supportsRtl="true" + android:requestLegacyExternalStorage="true" + android:theme="@style/AppTheme"> - + - - + + + android:label="@string/app_name" + android:name=".ui.HideAppActivity" + android:targetActivity=".ui.MainActivity" + android:exported="true"> - - + + - + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + android:label="@string/system_ui_navigation_title" + android:name=".ui.systemui.NavigationActivity" /> @@ -265,40 +359,64 @@ - - + + - - - - - + + + + + - + - - + + - + - - + + - + - + - + + android:name=".provider.SharedPrefsProvider" + android:authorities="com.sevtinge.cemiuiler.provider.sharedprefs" + android:grantUriPermissions="true" + android:exported="false" + android:directBootAware="true" /> - - - - - + + + + + diff --git a/app/src/main/java/com/sevtinge/cemiuiler/XposedInit.kt b/app/src/main/java/com/sevtinge/cemiuiler/XposedInit.kt index d80d0afe6b..c7af24bf57 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/XposedInit.kt +++ b/app/src/main/java/com/sevtinge/cemiuiler/XposedInit.kt @@ -25,7 +25,7 @@ class XposedInit : BaseXposedInit(), IXposedHookInitPackageResources { if (mPrefsMap.getBoolean("system_framework_clean_share_menu")) CleanShareMenu.initRes() if (mPrefsMap.getBoolean("system_framework_clean_open_menu")) CleanOpenMenu.initRes() if (mPrefsMap.getBoolean("system_framework_volume_separate_control")) VolumeSeparateControlForSettings.initRes() - //if (mPrefsMap.getBoolean("various_theme_crack")) ThemeCrack.initRes() + // if (mPrefsMap.getBoolean("various_theme_crack")) ThemeCrack.initRes() if (startupParam != null) { BackgroundBlurDrawable().initZygote(startupParam) SystemFrameworkForCorePatch().initZygote(startupParam) @@ -68,4 +68,4 @@ class XposedInit : BaseXposedInit(), IXposedHookInitPackageResources { } } -} \ No newline at end of file +} diff --git a/app/src/main/java/com/sevtinge/cemiuiler/data/LocationData.java b/app/src/main/java/com/sevtinge/cemiuiler/data/LocationData.java index e0c963d8b6..76095ef7ae 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/data/LocationData.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/data/LocationData.java @@ -2,18 +2,19 @@ public class LocationData { - private String Title; //备注 - private Double Longitude; //经度 - private Double Latitude; //纬度 + private String Title; // 备注 + private Double Longitude; // 经度 + private Double Latitude; // 纬度 private int Offset; - private int RegionCode; //区域代码 - private int BaseStationCode; //基站代码 + private int RegionCode; // 区域代码 + private int BaseStationCode; // 基站代码 private int f; - private String Remarks; //备注 + private String Remarks; // 备注 - public LocationData() {} + public LocationData() { + } - //标题,经度,纬度,偏移 + // 标题,经度,纬度,偏移 public LocationData(String title, Double longitude, Double latitude, int offset, int regionCode, int baseStationCode, String remarks, int i4) { Title = title; Longitude = longitude; diff --git a/app/src/main/java/com/sevtinge/cemiuiler/data/adapter/AppDataAdapter.java b/app/src/main/java/com/sevtinge/cemiuiler/data/adapter/AppDataAdapter.java index c20f82f02b..337ff481fb 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/data/adapter/AppDataAdapter.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/data/adapter/AppDataAdapter.java @@ -29,7 +29,7 @@ public class AppDataAdapter extends RecyclerView.Adapter appInfoList) { + public void setData(List appInfoList) { this.appInfoList = appInfoList; notifyDataSetChanged(); } @@ -42,9 +42,10 @@ public AppDataAdapter(Context context, String key, int type) { /** * 在Adapter中设置一个过滤方法,目的是为了将过滤后的数据传入Adapter中并刷新数据 + * * @param locationListModels */ - public void setFilter(List locationListModels ) { + public void setFilter(List locationListModels) { appInfoList = new ArrayList<>(); appInfoList.addAll(locationListModels); notifyDataSetChanged(); @@ -101,8 +102,8 @@ public ViewHolder(View itemView) { } } - public interface onItemClickListener{ - void onItemClick(View view, int position, AppData appData , boolean isCheck); + public interface onItemClickListener { + void onItemClick(View view, int position, AppData appData, boolean isCheck); } } diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/Aireco.java b/app/src/main/java/com/sevtinge/cemiuiler/module/Aireco.java index 572dd3f7cb..daee3fa0c4 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/Aireco.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/Aireco.java @@ -1,15 +1,15 @@ package com.sevtinge.cemiuiler.module; -import com.sevtinge.cemiuiler.module.base.BaseModule; import com.sevtinge.cemiuiler.module.aireco.DeviceModify; +import com.sevtinge.cemiuiler.module.base.BaseModule; public class Aireco extends BaseModule { - @Override - public void handleLoadPackage() { - initHook(new DeviceModify(), mPrefsMap.getBoolean("aireco_device_modify")); - } + @Override + public void handleLoadPackage() { + initHook(new DeviceModify(), mPrefsMap.getBoolean("aireco_device_modify")); } +} diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/Browser.java b/app/src/main/java/com/sevtinge/cemiuiler/module/Browser.java index ba7bd2e287..4bdb2288f9 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/Browser.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/Browser.java @@ -1,7 +1,8 @@ package com.sevtinge.cemiuiler.module; import com.sevtinge.cemiuiler.module.base.BaseModule; -import com.sevtinge.cemiuiler.module.browser.*; +import com.sevtinge.cemiuiler.module.browser.BrowserDexKit; +import com.sevtinge.cemiuiler.module.browser.DebugMode; public class Browser extends BaseModule { diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/Camera.java b/app/src/main/java/com/sevtinge/cemiuiler/module/Camera.java index b85c658162..d00e38b608 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/Camera.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/Camera.java @@ -1,13 +1,57 @@ package com.sevtinge.cemiuiler.module; import com.sevtinge.cemiuiler.module.base.BaseModule; -import com.sevtinge.cemiuiler.module.camera.*; +import com.sevtinge.cemiuiler.module.camera.EnableLabOptions; +import com.sevtinge.cemiuiler.module.camera.Unlock120Fps; +import com.sevtinge.cemiuiler.module.camera.Unlock60Fps; +import com.sevtinge.cemiuiler.module.camera.UnlockAiEnhance; +import com.sevtinge.cemiuiler.module.camera.UnlockAiShutter; +import com.sevtinge.cemiuiler.module.camera.UnlockAiWatermark; +import com.sevtinge.cemiuiler.module.camera.UnlockAmbilight; +import com.sevtinge.cemiuiler.module.camera.UnlockAudioZoom; +import com.sevtinge.cemiuiler.module.camera.UnlockClone; +import com.sevtinge.cemiuiler.module.camera.UnlockColorEnhance; +import com.sevtinge.cemiuiler.module.camera.UnlockCosmeticMirror; +import com.sevtinge.cemiuiler.module.camera.UnlockCvlens; +import com.sevtinge.cemiuiler.module.camera.UnlockCyberFocusVersion2; +import com.sevtinge.cemiuiler.module.camera.UnlockDoc; +import com.sevtinge.cemiuiler.module.camera.UnlockDualcam; +import com.sevtinge.cemiuiler.module.camera.UnlockDuration; +import com.sevtinge.cemiuiler.module.camera.UnlockFilm; +import com.sevtinge.cemiuiler.module.camera.UnlockFilmDelay; +import com.sevtinge.cemiuiler.module.camera.UnlockFilmDollyZoom; +import com.sevtinge.cemiuiler.module.camera.UnlockFilmDream; +import com.sevtinge.cemiuiler.module.camera.UnlockFilmSlowShutter; +import com.sevtinge.cemiuiler.module.camera.UnlockFilmTimeBackflow; +import com.sevtinge.cemiuiler.module.camera.UnlockFilmTimeFreeze; +import com.sevtinge.cemiuiler.module.camera.UnlockHandGesture; +import com.sevtinge.cemiuiler.module.camera.UnlockHdr; +import com.sevtinge.cemiuiler.module.camera.UnlockHeic; +import com.sevtinge.cemiuiler.module.camera.UnlockIdcard; +import com.sevtinge.cemiuiler.module.camera.UnlockLog; +import com.sevtinge.cemiuiler.module.camera.UnlockMakeup; +import com.sevtinge.cemiuiler.module.camera.UnlockMenMakeup; +import com.sevtinge.cemiuiler.module.camera.UnlockMilive; +import com.sevtinge.cemiuiler.module.camera.UnlockMoon; +import com.sevtinge.cemiuiler.module.camera.UnlockNevus; +import com.sevtinge.cemiuiler.module.camera.UnlockNewBeauty; +import com.sevtinge.cemiuiler.module.camera.UnlockPano; +import com.sevtinge.cemiuiler.module.camera.UnlockPixel; +import com.sevtinge.cemiuiler.module.camera.UnlockPortrait; +import com.sevtinge.cemiuiler.module.camera.UnlockRaw; +import com.sevtinge.cemiuiler.module.camera.UnlockSlow; +import com.sevtinge.cemiuiler.module.camera.UnlockTrackEyes; +import com.sevtinge.cemiuiler.module.camera.UnlockTrackFeature; +import com.sevtinge.cemiuiler.module.camera.UnlockTrackFocus; +import com.sevtinge.cemiuiler.module.camera.UnlockVideosky; +import com.sevtinge.cemiuiler.module.camera.UnlockVlog; +import com.sevtinge.cemiuiler.module.camera.UnlockVlogPro; public class Camera extends BaseModule { @Override public void handleLoadPackage() { - //功能 + // 功能 initHook(new UnlockAiWatermark(), mPrefsMap.getBoolean("camera_features_unlock_aiwatermark")); initHook(new UnlockAmbilight(), mPrefsMap.getBoolean("camera_features_unlock_ambilight")); initHook(new UnlockClone(), mPrefsMap.getBoolean("camera_features_unlock_clone")); @@ -33,27 +77,27 @@ public void handleLoadPackage() { initHook(new UnlockFilmTimeBackflow(), mPrefsMap.getBoolean("camera_features_unlock_film_timebackflow")); initHook(new UnlockFilmTimeFreeze(), mPrefsMap.getBoolean("camera_features_unlock_film_timefreeze")); - //拍照 + // 拍照 initHook(new UnlockMakeup(), mPrefsMap.getBoolean("camera_shot_makeup")); initHook(new UnlockColorEnhance(), mPrefsMap.getBoolean("camera_shot_color_enhance")); initHook(new UnlockHandGesture(), mPrefsMap.getBoolean("camera_shot_hand_gesture")); - //录像 + // 录像 initHook(new Unlock60Fps(), mPrefsMap.getBoolean("camera_record_60fps")); initHook(new Unlock120Fps(), mPrefsMap.getBoolean("camera_record_120fps")); initHook(new UnlockHdr(), mPrefsMap.getBoolean("camera_record_hdr")); initHook(new UnlockAiEnhance(), mPrefsMap.getBoolean("camera_record_ai")); initHook(new UnlockAudioZoom(), mPrefsMap.getBoolean("camera_record_audio_zoom")); - //人像 + // 人像 initHook(new UnlockCvlens(), mPrefsMap.getBoolean("camera_portrait_cvlens")); initHook(new UnlockNewBeauty(), mPrefsMap.getBoolean("camera_portrait_new_beauty")); - //专业 + // 专业 initHook(new UnlockRaw(), mPrefsMap.getBoolean("camera_pro_raw")); initHook(new UnlockLog(), mPrefsMap.getBoolean("camera_pro_log")); - //设置 + // 设置 initHook(new UnlockTrackFeature(), (mPrefsMap.getBoolean("camera_settings_track_eyes") || mPrefsMap.getBoolean("camera_settings_track_focus"))); initHook(new UnlockHeic(), mPrefsMap.getBoolean("camera_settings_heic")); initHook(new UnlockTrackFocus(), mPrefsMap.getBoolean("camera_settings_track_focus")); diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/ContentExtension.java b/app/src/main/java/com/sevtinge/cemiuiler/module/ContentExtension.java index dcab8c3a37..281e166ebf 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/ContentExtension.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/ContentExtension.java @@ -1,7 +1,6 @@ package com.sevtinge.cemiuiler.module; import com.sevtinge.cemiuiler.module.base.BaseModule; -import com.sevtinge.cemiuiler.module.clock.EnableHourGlass; import com.sevtinge.cemiuiler.module.contentextension.DoublePress; import com.sevtinge.cemiuiler.module.contentextension.LinkOpenMode; import com.sevtinge.cemiuiler.module.contentextension.SuperImage; @@ -9,12 +8,12 @@ public class ContentExtension extends BaseModule { - @Override - public void handleLoadPackage() { - initHook(new UseThirdPartyBrowser(), mPrefsMap.getBoolean("content_extension_browser")); - initHook(new DoublePress(), mPrefsMap.getBoolean("content_extension_double_press")); - initHook(new SuperImage(), mPrefsMap.getBoolean("content_extension_super_image")); - initHook(new LinkOpenMode()); - } + @Override + public void handleLoadPackage() { + initHook(new UseThirdPartyBrowser(), mPrefsMap.getBoolean("content_extension_browser")); + initHook(new DoublePress(), mPrefsMap.getBoolean("content_extension_double_press")); + initHook(new SuperImage(), mPrefsMap.getBoolean("content_extension_super_image")); + initHook(new LinkOpenMode()); } +} diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/Gallery.java b/app/src/main/java/com/sevtinge/cemiuiler/module/Gallery.java index f1a50aa12c..631a4e05a2 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/Gallery.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/Gallery.java @@ -1,7 +1,17 @@ package com.sevtinge.cemiuiler.module; import com.sevtinge.cemiuiler.module.base.BaseModule; -import com.sevtinge.cemiuiler.module.gallery.*; +import com.sevtinge.cemiuiler.module.gallery.EnableHdrEnhance; +import com.sevtinge.cemiuiler.module.gallery.EnableIdPhoto; +import com.sevtinge.cemiuiler.module.gallery.EnableMagicSky; +import com.sevtinge.cemiuiler.module.gallery.EnableOcr; +import com.sevtinge.cemiuiler.module.gallery.EnableOcrForm; +import com.sevtinge.cemiuiler.module.gallery.EnablePdf; +import com.sevtinge.cemiuiler.module.gallery.EnablePhotoMovie; +import com.sevtinge.cemiuiler.module.gallery.EnableRemover2; +import com.sevtinge.cemiuiler.module.gallery.EnableTextYanhua; +import com.sevtinge.cemiuiler.module.gallery.EnableVideoPost; +import com.sevtinge.cemiuiler.module.gallery.UnlockSuperClipboard; public class Gallery extends BaseModule { diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/GlobalActions.java b/app/src/main/java/com/sevtinge/cemiuiler/module/GlobalActions.java index 9ba5b946cf..bd134946e7 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/GlobalActions.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/GlobalActions.java @@ -29,12 +29,12 @@ public void init() { setupRestartActions(); } - //GlobalActions + // GlobalActions public void setupGlobalActions() { hookAllConstructors("com.android.server.accessibility.AccessibilityManagerService", new MethodHook() { @Override protected void after(MethodHookParam param) throws Throwable { - Context mGlobalContext = (Context)param.args[0]; + Context mGlobalContext = (Context) param.args[0]; IntentFilter mFilter = new IntentFilter(); // Actions mFilter.addAction(ACTION_PREFIX + "ToggleColorInversion"); @@ -50,7 +50,7 @@ protected void after(MethodHookParam param) throws Throwable { public static void proxySystemProperties(String method, String prop, String val, ClassLoader classLoader) { XposedHelpers.callStaticMethod(XposedHelpers.findClassIfExists("android.os.SystemProperties", classLoader), - method, prop, val); + method, prop, val); } @@ -80,10 +80,10 @@ public void onReceive(Context context, Intent intent) { XposedHelpers.callMethod(wms, "lockNow", (Object) null); } case ACTION_PREFIX + "GoToSleep" -> - XposedHelpers.callMethod(context.getSystemService(Context.POWER_SERVICE), "goToSleep", SystemClock.uptimeMillis()); + XposedHelpers.callMethod(context.getSystemService(Context.POWER_SERVICE), "goToSleep", SystemClock.uptimeMillis()); case ACTION_PREFIX + "ScreenCapture" -> - context.sendBroadcast(new Intent("android.intent.action.CAPTURE_SCREENSHOT")); + context.sendBroadcast(new Intent("android.intent.action.CAPTURE_SCREENSHOT")); case ACTION_PREFIX + "OpenPowerMenu" -> { clsWMG = findClass("android.view.WindowManagerGlobal"); @@ -112,12 +112,12 @@ public void onReceive(Context context, Intent intent) { } }; - //RestartActions + // RestartActions public void setupRestartActions() { hookAllMethods("com.android.server.policy.PhoneWindowManager", "init", new MethodHook() { @Override protected void after(MethodHookParam param) throws Throwable { - Context mContext = (Context)XposedHelpers.getObjectField(param.thisObject, "mContext"); + Context mContext = (Context) XposedHelpers.getObjectField(param.thisObject, "mContext"); IntentFilter intentfilter = new IntentFilter(); intentfilter.addAction(ACTION_PREFIX + "RestartApps"); intentfilter.addAction(ACTION_PREFIX + "RestartHome"); @@ -140,10 +140,9 @@ public void onReceive(Context context, Intent intent) { switch (action) { case ACTION_PREFIX + "RestartApps" -> - forceStopPackage(context, intent.getStringExtra("packageName")); + forceStopPackage(context, intent.getStringExtra("packageName")); - case ACTION_PREFIX + "RestartHome" -> - forceStopPackage(context, "com.miui.home"); + case ACTION_PREFIX + "RestartHome" -> forceStopPackage(context, "com.miui.home"); } } catch (Exception e) { LogUtils.log(e); @@ -152,8 +151,6 @@ public void onReceive(Context context, Intent intent) { }; - - public static boolean handleAction(Context context, String key) { return handleAction(context, key, false); } @@ -169,13 +166,13 @@ public static boolean handleAction(Context context, String key, boolean skipLock } return switch (action) { case 1 -> setAction(context, "OpenNotificationCenter"); - case 2 -> setAction(context,"ClearMemory"); - case 3 -> setAction(context,"ToggleColorInversion"); + case 2 -> setAction(context, "ClearMemory"); + case 3 -> setAction(context, "ToggleColorInversion"); case 4 -> setAction(context, "LockScreen"); case 5 -> setAction(context, "GoToSleep"); case 6 -> setAction(context, "ScreenCapture"); - case 7 -> setAction(context, "OpenRecents"); - case 8 -> setAction(context,"OpenVolumeDialog"); + case 7 -> setAction(context, "OpenRecents"); + case 8 -> setAction(context, "OpenVolumeDialog"); case 12 -> setAction(context, "OpenPowerMenu"); case 13 -> launchAppIntent(context, key, skipLock); /* @@ -234,9 +231,9 @@ public static boolean goToSleep(Context context) { public static boolean isMediaActionsAllowed(Context mContext) { - AudioManager am = (AudioManager)mContext.getSystemService(Context.AUDIO_SERVICE); + AudioManager am = (AudioManager) mContext.getSystemService(Context.AUDIO_SERVICE); boolean isMusicActive = am.isMusicActive(); - boolean isMusicActiveRemotely = (Boolean)XposedHelpers.callMethod(am, "isMusicActiveRemotely"); + boolean isMusicActiveRemotely = (Boolean) XposedHelpers.callMethod(am, "isMusicActiveRemotely"); boolean isAllowed = isMusicActive || isMusicActiveRemotely; if (!isAllowed) { long mCurrentTime = currentTimeMillis(); @@ -247,12 +244,12 @@ public static boolean isMediaActionsAllowed(Context mContext) { } public static void sendDownUpKeyEvent(Context mContext, int keyCode, boolean vibrate) { - AudioManager am = (AudioManager)mContext.getSystemService(Context.AUDIO_SERVICE); + AudioManager am = (AudioManager) mContext.getSystemService(Context.AUDIO_SERVICE); am.dispatchMediaKeyEvent(new KeyEvent(KeyEvent.ACTION_DOWN, keyCode)); am.dispatchMediaKeyEvent(new KeyEvent(KeyEvent.ACTION_UP, keyCode)); - if (vibrate && PrefsUtils.getSharedBoolPrefs(mContext, "prefs_key_controls_volumemedia_vibrate", true)); - /*Helpers.performStrongVibration(mContext, PrefsUtils.getSharedBoolPrefs(mContext, "prefa_key_controls_volumemedia_vibrate_ignore", false));*/ + if (vibrate && PrefsUtils.getSharedBoolPrefs(mContext, "prefs_key_controls_volumemedia_vibrate", true)) ; + /*Helpers.performStrongVibration(mContext, PrefsUtils.getSharedBoolPrefs(mContext, "prefa_key_controls_volumemedia_vibrate_ignore", false));*/ } public static boolean launchAppIntent(Context context, String key, boolean skipLock) { diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/GuardProvider.java b/app/src/main/java/com/sevtinge/cemiuiler/module/GuardProvider.java index b459f2d693..56417c431a 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/GuardProvider.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/GuardProvider.java @@ -1,13 +1,14 @@ package com.sevtinge.cemiuiler.module; import com.sevtinge.cemiuiler.module.base.BaseModule; -import com.sevtinge.cemiuiler.module.guardprovider.*; +import com.sevtinge.cemiuiler.module.guardprovider.DisableUploadAppListNew; +import com.sevtinge.cemiuiler.module.guardprovider.GuardProviderDexKit; public class GuardProvider extends BaseModule { @Override public void handleLoadPackage() { initHook(new GuardProviderDexKit()); - //initHook(new DisableUploadAppList(), mPrefsMap.getBoolean("disable_upload_applist")); + // initHook(new DisableUploadAppList(), mPrefsMap.getBoolean("disable_upload_applist")); initHook(new DisableUploadAppListNew(), mPrefsMap.getBoolean("disable_upload_applist")); } } diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/Home.java b/app/src/main/java/com/sevtinge/cemiuiler/module/Home.java index 4b5c3e9450..8b6af40f40 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/Home.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/Home.java @@ -1,25 +1,87 @@ package com.sevtinge.cemiuiler.module; import com.sevtinge.cemiuiler.module.base.BaseModule; -import com.sevtinge.cemiuiler.module.home.*; -import com.sevtinge.cemiuiler.module.home.dock.*; +import com.sevtinge.cemiuiler.module.home.AllAppsBlur; +import com.sevtinge.cemiuiler.module.home.AnimDurationRatio; +import com.sevtinge.cemiuiler.module.home.DoubleTap; +import com.sevtinge.cemiuiler.module.home.FreeFormCountForHome; +import com.sevtinge.cemiuiler.module.home.HomePortraitReverse; +import com.sevtinge.cemiuiler.module.home.HotSeatSwipe; +import com.sevtinge.cemiuiler.module.home.MaxFreeForm; +import com.sevtinge.cemiuiler.module.home.ScreenSwipe; +import com.sevtinge.cemiuiler.module.home.SeekPoints; +import com.sevtinge.cemiuiler.module.home.SetDeviceLevel; +import com.sevtinge.cemiuiler.module.home.ShakeDevice; +import com.sevtinge.cemiuiler.module.home.StickyFloatingWindowsForHome; +import com.sevtinge.cemiuiler.module.home.UnlockHotseatIcon; +import com.sevtinge.cemiuiler.module.home.UserPresentAnimation; +import com.sevtinge.cemiuiler.module.home.WidgetCornerRadius; +import com.sevtinge.cemiuiler.module.home.WidgetCrack; +import com.sevtinge.cemiuiler.module.home.dock.DockCustom; +import com.sevtinge.cemiuiler.module.home.dock.FoldDeviceDock; +import com.sevtinge.cemiuiler.module.home.dock.FoldDock; +import com.sevtinge.cemiuiler.module.home.dock.HideSeekPoint; +import com.sevtinge.cemiuiler.module.home.dock.ShowDockIconTitle; import com.sevtinge.cemiuiler.module.home.drawer.AllAppsContainerViewBlur; import com.sevtinge.cemiuiler.module.home.drawer.AppDrawer; -import com.sevtinge.cemiuiler.module.home.folder.*; +import com.sevtinge.cemiuiler.module.home.folder.BigFolderIcon; +import com.sevtinge.cemiuiler.module.home.folder.BigFolderIconBlur; +import com.sevtinge.cemiuiler.module.home.folder.BigFolderIconBlur1x2; +import com.sevtinge.cemiuiler.module.home.folder.BigFolderIconBlur2x1; +import com.sevtinge.cemiuiler.module.home.folder.BigFolderItemMaxCount; +import com.sevtinge.cemiuiler.module.home.folder.FolderAnimation; +import com.sevtinge.cemiuiler.module.home.folder.FolderAutoClose; +import com.sevtinge.cemiuiler.module.home.folder.FolderBlur; +import com.sevtinge.cemiuiler.module.home.folder.FolderColumns; +import com.sevtinge.cemiuiler.module.home.folder.FolderShade; +import com.sevtinge.cemiuiler.module.home.folder.FolderVerticalPadding; +import com.sevtinge.cemiuiler.module.home.folder.SmallFolderIconBlur; import com.sevtinge.cemiuiler.module.home.layout.HotSeatsHeight; import com.sevtinge.cemiuiler.module.home.layout.HotSeatsMarginBottom; import com.sevtinge.cemiuiler.module.home.layout.HotSeatsMarginTop; import com.sevtinge.cemiuiler.module.home.layout.SearchBarMarginBottom; import com.sevtinge.cemiuiler.module.home.layout.UnlockGrids; import com.sevtinge.cemiuiler.module.home.layout.WorkspacePaddingBottom; -import com.sevtinge.cemiuiler.module.home.other.*; -import com.sevtinge.cemiuiler.module.home.recent.*; -import com.sevtinge.cemiuiler.module.home.title.*; +import com.sevtinge.cemiuiler.module.home.other.AlwaysBlurWallpaper; +import com.sevtinge.cemiuiler.module.home.other.AlwaysShowStatusClock; +import com.sevtinge.cemiuiler.module.home.other.BlurRadius; +import com.sevtinge.cemiuiler.module.home.other.BlurWhenShowShortcutMenu; +import com.sevtinge.cemiuiler.module.home.other.DisableHideGoogle; +import com.sevtinge.cemiuiler.module.home.other.FixAndroidRS; +import com.sevtinge.cemiuiler.module.home.other.FreeformShortcutMenu; +import com.sevtinge.cemiuiler.module.home.other.HomeMode; +import com.sevtinge.cemiuiler.module.home.other.InfiniteScroll; +import com.sevtinge.cemiuiler.module.home.other.OverlapMode; +import com.sevtinge.cemiuiler.module.home.other.ShortcutItemCount; +import com.sevtinge.cemiuiler.module.home.other.ShowAllHideApp; +import com.sevtinge.cemiuiler.module.home.recent.BlurLevel; +import com.sevtinge.cemiuiler.module.home.recent.CardTextColor; +import com.sevtinge.cemiuiler.module.home.recent.CardTextSize; +import com.sevtinge.cemiuiler.module.home.recent.DisableRecentViewWallpaperDarken; +import com.sevtinge.cemiuiler.module.home.recent.FreeformCardBackgroundColor; +import com.sevtinge.cemiuiler.module.home.recent.HideCleanUp; +import com.sevtinge.cemiuiler.module.home.recent.HideFreeform; +import com.sevtinge.cemiuiler.module.home.recent.HideStatusBarWhenEnterRecent; +import com.sevtinge.cemiuiler.module.home.recent.RealMemory; +import com.sevtinge.cemiuiler.module.home.recent.RecentResource; +import com.sevtinge.cemiuiler.module.home.recent.RecentText; +import com.sevtinge.cemiuiler.module.home.recent.RemoveCardAnim; +import com.sevtinge.cemiuiler.module.home.recent.RemoveIcon; +import com.sevtinge.cemiuiler.module.home.recent.TaskViewHorizontal; +import com.sevtinge.cemiuiler.module.home.recent.TaskViewVertical; +import com.sevtinge.cemiuiler.module.home.title.BigIconCorner; +import com.sevtinge.cemiuiler.module.home.title.DownloadAnimation; +import com.sevtinge.cemiuiler.module.home.title.EnableIconMonoChrome; +import com.sevtinge.cemiuiler.module.home.title.FixAnimation; +import com.sevtinge.cemiuiler.module.home.title.IconTitleColor; +import com.sevtinge.cemiuiler.module.home.title.LargeIconCornerRadius; +import com.sevtinge.cemiuiler.module.home.title.PerfectIcon; +import com.sevtinge.cemiuiler.module.home.title.TitleFontSize; +import com.sevtinge.cemiuiler.module.home.title.TitleMarquee; import com.sevtinge.cemiuiler.module.home.widget.AllWidgetAnimation; import com.sevtinge.cemiuiler.module.home.widget.AllowMoveAllWidgetToMinus; import com.sevtinge.cemiuiler.module.home.widget.AlwaysShowMiuiWidget; import com.sevtinge.cemiuiler.module.home.widget.HideWidgetTitles; -import com.sevtinge.cemiuiler.module.home.SetDeviceLevel; import com.sevtinge.cemiuiler.module.home.widget.ResizableWidgets; import java.util.Objects; @@ -29,33 +91,33 @@ public class Home extends BaseModule { @Override public void handleLoadPackage() { - //手势 + // 手势 initHook(new DoubleTap(), mPrefsMap.getInt("home_gesture_double_tap_action", 0) > 0); initHook(new ScreenSwipe(), mPrefsMap.getInt("home_gesture_up_swipe_action", 0) > 0 || - mPrefsMap.getInt("home_gesture_down_swipe_action", 0) > 0 || - mPrefsMap.getInt("home_gesture_up_swipe2_action", 0) > 0 || - mPrefsMap.getInt("home_gesture_down_swipe2_action", 0) > 0); + mPrefsMap.getInt("home_gesture_down_swipe_action", 0) > 0 || + mPrefsMap.getInt("home_gesture_up_swipe2_action", 0) > 0 || + mPrefsMap.getInt("home_gesture_down_swipe2_action", 0) > 0); initHook(new HotSeatSwipe(), mPrefsMap.getInt("home_gesture_left_swipe_action", 0) > 0 - || mPrefsMap.getInt("home_gesture_right_swipe_action", 0) > 0); + || mPrefsMap.getInt("home_gesture_right_swipe_action", 0) > 0); initHook(new ShakeDevice(), mPrefsMap.getInt("home_gesture_shake_action", 0) > 0); - //布局 + // 布局 initHook(new UnlockGrids(), mPrefsMap.getBoolean("home_layout_unlock_grids")); - //initHook(new UnlockGridsNoWord(), mPrefsMap.getBoolean("home_layout_unlock_grids_no_word")); + // initHook(new UnlockGridsNoWord(), mPrefsMap.getBoolean("home_layout_unlock_grids_no_word")); initHook(new WorkspacePaddingBottom(), mPrefsMap.getBoolean("home_layout_workspace_padding_bottom_enable")); initHook(new HotSeatsHeight(), mPrefsMap.getBoolean("home_layout_hotseats_height_enable")); initHook(new HotSeatsMarginTop(), mPrefsMap.getBoolean("home_layout_hotseats_margin_top_enable")); initHook(new HotSeatsMarginBottom(), mPrefsMap.getBoolean("home_layout_hotseats_margin_bottom_enable")); initHook(new SearchBarMarginBottom(), (mPrefsMap.getInt("home_layout_searchbar_margin_bottom", 0) > 0) && - mPrefsMap.getBoolean("home_layout_searchbar_margin_bottom_enable")); + mPrefsMap.getBoolean("home_layout_searchbar_margin_bottom_enable")); - //文件夹 + // 文件夹 initHook(FolderAutoClose.INSTANCE, mPrefsMap.getBoolean("home_folder_auto_close")); initHook(new FolderShade(), mPrefsMap.getStringAsInt("home_folder_shade", 1) > 0); initHook(FolderColumns.INSTANCE, mPrefsMap.getInt("home_folder_columns", 3) != 3 || - mPrefsMap.getBoolean("home_folder_width")); + mPrefsMap.getBoolean("home_folder_width")); initHook(new FolderAnimation(), mPrefsMap.getBoolean("home_folder_animation")); initHook(new SmallFolderIconBlur(), mPrefsMap.getBoolean("home_small_folder_icon_bg")); initHook(FolderVerticalPadding.INSTANCE, mPrefsMap.getInt("home_folder_vertical_padding", 0) != 0); @@ -66,12 +128,12 @@ public void handleLoadPackage() { initHook(new BigFolderIconBlur(), mPrefsMap.getBoolean("home_big_folder_icon_bg")); initHook(new BigFolderItemMaxCount(), mPrefsMap.getBoolean("home_big_folder_item_max_count")); - //抽屉 + // 抽屉 initHook(AppDrawer.INSTANCE, mPrefsMap.getBoolean("home_drawer_all") || - mPrefsMap.getBoolean("home_drawer_editor")); + mPrefsMap.getBoolean("home_drawer_editor")); initHook(AllAppsContainerViewBlur.INSTANCE, mPrefsMap.getBoolean("home_drawer_blur")); - //最近任务 + // 最近任务 initHook(BlurLevel.INSTANCE, mPrefsMap.getStringAsInt("home_recent_blur_level", 6) != 6); initHook(DisableRecentViewWallpaperDarken.INSTANCE, mPrefsMap.getBoolean("home_recent_disable_wallpaper_dimming")); initHook(HideStatusBarWhenEnterRecent.INSTANCE, true); @@ -88,18 +150,18 @@ public void handleLoadPackage() { initHook(RecentResource.INSTANCE); initHook(RealMemory.INSTANCE, mPrefsMap.getBoolean("home_recent_show_real_memory")); - //图标 + // 图标 initHook(BigIconCorner.INSTANCE, mPrefsMap.getBoolean("home_title_big_icon_corner")); initHook(new DownloadAnimation(), mPrefsMap.getBoolean("home_title_download_animation")); // initHook(new IconScaleHook()/*, mPrefsMap.getInt("home_title_icon_scale", 100) != 100*/); - //标题 + // 标题 initHook(new TitleMarquee(), mPrefsMap.getBoolean("home_title_title_marquee")); initHook(new TitleFontSize(), mPrefsMap.getInt("home_title_font_size", 12) != 12); initHook(IconTitleColor.INSTANCE); initHook(new UnlockHotseatIcon(), mPrefsMap.getBoolean("home_dock_unlock_hotseat")); - //小部件 + // 小部件 initHook(new AllWidgetAnimation(), mPrefsMap.getBoolean("home_widget_all_widget_animation")); initHook(AlwaysShowMiuiWidget.INSTANCE, mPrefsMap.getBoolean("home_widget_show_miui_widget")); initHook(AllowMoveAllWidgetToMinus.INSTANCE, mPrefsMap.getBoolean("home_widget_allow_moved_to_minus_one_screen")); @@ -107,14 +169,14 @@ public void handleLoadPackage() { initHook(HideWidgetTitles.INSTANCE, mPrefsMap.getBoolean("home_widget_hide_title")); initHook(ResizableWidgets.INSTANCE, mPrefsMap.getBoolean("home_widget_resizable")); - //底栏 + // 底栏 initHook(new DockCustom(), mPrefsMap.getBoolean("home_dock_bg_custom_enable")); initHook(new SeekPoints(), mPrefsMap.getStringAsInt("home_other_seek_points", 0) > 0); initHook(FoldDeviceDock.INSTANCE, mPrefsMap.getBoolean("home_dock_fold")); initHook(HideSeekPoint.INSTANCE, mPrefsMap.getBoolean("home_dock_hide_seekpoint")); initHook(ShowDockIconTitle.INSTANCE, mPrefsMap.getBoolean("home_dock_icon_title")); - //其他 + // 其他 initHook(new HomeMode(), mPrefsMap.getStringAsInt("home_other_home_mode", 0) > 0); initHook(AlwaysShowStatusClock.INSTANCE, mPrefsMap.getBoolean("home_other_show_clock")); initHook(new InfiniteScroll(), mPrefsMap.getBoolean("home_other_infinite_scroll")); @@ -130,7 +192,7 @@ public void handleLoadPackage() { initHook(new ShowAllHideApp()); initHook(FixAndroidRS.INSTANCE, mPrefsMap.getBoolean("home_other_fix_android_r_s")); - //实验性功能 + // 实验性功能 initHook(BlurWhenShowShortcutMenu.INSTANCE, mPrefsMap.getBoolean("home_other_shortcut_background_blur")); initHook(FolderBlur.INSTANCE, mPrefsMap.getBoolean("home_folder_blur")); initHook(new FoldDock(), mPrefsMap.getBoolean("home_other_fold_dock")); @@ -140,14 +202,14 @@ public void handleLoadPackage() { initHook(new LargeIconCornerRadius(), true); } - //多小窗 + // 多小窗 initHook(new FreeFormCountForHome(), mPrefsMap.getBoolean("system_framework_freeform_count")); initHook(new MaxFreeForm(), mPrefsMap.getBoolean("system_framework_freeform_count")); - //Fold2样式负一屏 + // Fold2样式负一屏 initHook(new OverlapMode(), mPrefsMap.getBoolean("personal_assistant_overlap_mode")); - //Other + // Other initHook(new StickyFloatingWindowsForHome(), mPrefsMap.getBoolean("system_framework_freeform_sticky")); initHook(new WidgetCrack(), mPrefsMap.getBoolean("hidden_function") && mPrefsMap.getBoolean("personal_assistant_widget_crack")); initHook(AnimDurationRatio.INSTANCE, true); diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/InCallUi.java b/app/src/main/java/com/sevtinge/cemiuiler/module/InCallUi.java index 8ed2fb20cb..e6adad4600 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/InCallUi.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/InCallUi.java @@ -2,14 +2,13 @@ import com.sevtinge.cemiuiler.module.base.BaseModule; import com.sevtinge.cemiuiler.module.incallui.HideCrbt; -import com.sevtinge.cemiuiler.module.joyose.DisableCloudControl; public class InCallUi extends BaseModule { - @Override - public void handleLoadPackage() { - initHook(new HideCrbt(), mPrefsMap.getBoolean("incallui_hide_crbt")); - } + @Override + public void handleLoadPackage() { + initHook(new HideCrbt(), mPrefsMap.getBoolean("incallui_hide_crbt")); } +} diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/Joyose.java b/app/src/main/java/com/sevtinge/cemiuiler/module/Joyose.java index 5d244002a5..79c377feff 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/Joyose.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/Joyose.java @@ -1,7 +1,9 @@ package com.sevtinge.cemiuiler.module; import com.sevtinge.cemiuiler.module.base.BaseModule; -import com.sevtinge.cemiuiler.module.joyose.*; +import com.sevtinge.cemiuiler.module.joyose.DisableCloudControl; +import com.sevtinge.cemiuiler.module.joyose.EnableGpuTuner; +import com.sevtinge.cemiuiler.module.joyose.JoyoseDexKit; public class Joyose extends BaseModule { diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/Lbe.java b/app/src/main/java/com/sevtinge/cemiuiler/module/Lbe.java index dc0af34482..74030bf7e9 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/Lbe.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/Lbe.java @@ -8,7 +8,7 @@ public class Lbe extends BaseModule { @Override public void handleLoadPackage() { initHook(DisableClipboardTip.INSTANCE, mPrefsMap.getBoolean("lbe_disable_clipboard_tip") || - mPrefsMap.getBoolean("lbe_clipboard_tip_toast")); + mPrefsMap.getBoolean("lbe_clipboard_tip_toast")); } } diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/Market.java b/app/src/main/java/com/sevtinge/cemiuiler/module/Market.java index 3a48c2a09c..6159860edc 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/Market.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/Market.java @@ -1,7 +1,9 @@ package com.sevtinge.cemiuiler.module; import com.sevtinge.cemiuiler.module.base.BaseModule; -import com.sevtinge.cemiuiler.module.market.*; +import com.sevtinge.cemiuiler.module.market.DeviceModify; +import com.sevtinge.cemiuiler.module.market.MarketDexKit; +import com.sevtinge.cemiuiler.module.market.NewIcon; public class Market extends BaseModule { diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/MediaEditor.java b/app/src/main/java/com/sevtinge/cemiuiler/module/MediaEditor.java index 2de35c427f..0a68c88639 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/MediaEditor.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/MediaEditor.java @@ -7,13 +7,13 @@ public class MediaEditor extends BaseModule { - @Override - public void handleLoadPackage() { - //XposedBridge.log("Cemiuiler: debug."); - initHook(new MediaEditorDexKit()); - initHook(new UnlockMinimumCropLimit(), mPrefsMap.getBoolean("mediaeditor_unlock_minimum_crop_limit")); - initHook(FilterManagerAll.INSTANCE, mPrefsMap.getBoolean("mediaeditor_filter_manager")); - } + @Override + public void handleLoadPackage() { + // XposedBridge.log("Cemiuiler: debug."); + initHook(new MediaEditorDexKit()); + initHook(new UnlockMinimumCropLimit(), mPrefsMap.getBoolean("mediaeditor_unlock_minimum_crop_limit")); + initHook(FilterManagerAll.INSTANCE, mPrefsMap.getBoolean("mediaeditor_filter_manager")); + } } diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/MiShare.java b/app/src/main/java/com/sevtinge/cemiuiler/module/MiShare.java index f3a27ce80a..3c9aed8771 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/MiShare.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/MiShare.java @@ -1,14 +1,14 @@ package com.sevtinge.cemiuiler.module; import com.sevtinge.cemiuiler.module.base.BaseModule; -import com.sevtinge.cemiuiler.module.mishare.*; +import com.sevtinge.cemiuiler.module.mishare.NoAutoTurnOff; public class MiShare extends BaseModule { @Override public void handleLoadPackage() { - //initHook(new MiShareDexKit()); - //initHook(new DisableMishareAutoOff(), mPrefsMap.getBoolean("disable_mishare_auto_off")); + // initHook(new MiShareDexKit()); + // initHook(new DisableMishareAutoOff(), mPrefsMap.getBoolean("disable_mishare_auto_off")); initHook(new NoAutoTurnOff(), mPrefsMap.getBoolean("disable_mishare_auto_off")); } } diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/MiWallpaper.java b/app/src/main/java/com/sevtinge/cemiuiler/module/MiWallpaper.java index e52587b8ab..a75df07a8e 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/MiWallpaper.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/MiWallpaper.java @@ -1,7 +1,7 @@ package com.sevtinge.cemiuiler.module; import com.sevtinge.cemiuiler.module.base.BaseModule; -import com.sevtinge.cemiuiler.module.miwallpaper.*; +import com.sevtinge.cemiuiler.module.miwallpaper.UnlockSuperWallpaper; public class MiWallpaper extends BaseModule { diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/Mtb.java b/app/src/main/java/com/sevtinge/cemiuiler/module/Mtb.java index 63b0ebed04..49b614f0c4 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/Mtb.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/Mtb.java @@ -1,7 +1,8 @@ package com.sevtinge.cemiuiler.module; import com.sevtinge.cemiuiler.module.base.BaseModule; -import com.sevtinge.cemiuiler.module.mtb.*; +import com.sevtinge.cemiuiler.module.mtb.BypassAuthentication; +import com.sevtinge.cemiuiler.module.mtb.IsUserBuild; public class Mtb extends BaseModule { @Override @@ -9,4 +10,4 @@ public void handleLoadPackage() { initHook(BypassAuthentication.INSTANCE, mPrefsMap.getBoolean("mtb_auth")); initHook(IsUserBuild.INSTANCE, mPrefsMap.getBoolean("mtb_auth")); } -} \ No newline at end of file +} diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/Music.java b/app/src/main/java/com/sevtinge/cemiuiler/module/Music.java index 35b7e5471f..ad76c7078f 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/Music.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/Music.java @@ -5,10 +5,10 @@ public class Music extends BaseModule { - @Override - public void handleLoadPackage() { - initHook(new DisableAd(), mPrefsMap.getBoolean("music_disable_ad")); - } + @Override + public void handleLoadPackage() { + initHook(new DisableAd(), mPrefsMap.getBoolean("music_disable_ad")); } +} diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/PackageInstaller.java b/app/src/main/java/com/sevtinge/cemiuiler/module/PackageInstaller.java index 387e3288cf..ba1ff6332a 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/PackageInstaller.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/PackageInstaller.java @@ -3,7 +3,15 @@ import android.text.TextUtils; import com.sevtinge.cemiuiler.module.base.BaseModule; -import com.sevtinge.cemiuiler.module.packageinstaller.*; +import com.sevtinge.cemiuiler.module.packageinstaller.AllAsSystemApp; +import com.sevtinge.cemiuiler.module.packageinstaller.DisableAD; +import com.sevtinge.cemiuiler.module.packageinstaller.DisableCountChecking; +import com.sevtinge.cemiuiler.module.packageinstaller.DisableSafeModelTip; +import com.sevtinge.cemiuiler.module.packageinstaller.DisplayMoreApkInfoNew; +import com.sevtinge.cemiuiler.module.packageinstaller.InstallRiskDisable; +import com.sevtinge.cemiuiler.module.packageinstaller.InstallSource; +import com.sevtinge.cemiuiler.module.packageinstaller.PackageInstallerDexKit; +import com.sevtinge.cemiuiler.module.packageinstaller.SafeMode; public class PackageInstaller extends BaseModule { @@ -14,29 +22,29 @@ public void handleLoadPackage() { // /*initHook(new MiuiPackageInstallModify(), mPrefsMap.getBoolean("miui_package_installer_modify"));*/ - //纯净模式 + // 纯净模式 initHook(new SafeMode(), true); - //禁用广告 + // 禁用广告 initHook(new DisableAD(), mPrefsMap.getBoolean("miui_package_installer_disable_ad")); - //禁用风险检测 + // 禁用风险检测 initHook(new InstallRiskDisable(), mPrefsMap.getBoolean("miui_package_installer_install_risk")); - //禁用安全守护提示 + // 禁用安全守护提示 initHook(new DisableSafeModelTip(), mPrefsMap.getBoolean("miui_package_installer_safe_model_tip")); - //允许更新系统应用 + // 允许更新系统应用 initHook(new AllAsSystemApp(), mPrefsMap.getBoolean("miui_package_installer_update_system_app")); - //自定义安装来源 + // 自定义安装来源 initHook(new InstallSource(), !TextUtils.isEmpty(mPrefsMap.getString("miui_package_installer_install_source", "com.android.fileexplorer"))); - //显示更多安装包信息 - //initHook(new DisplayMoreApkInfo(), mPrefsMap.getBoolean("miui_package_installer_apk_info")); + // 显示更多安装包信息 + // initHook(new DisplayMoreApkInfo(), mPrefsMap.getBoolean("miui_package_installer_apk_info")); initHook(DisplayMoreApkInfoNew.INSTANCE, mPrefsMap.getBoolean("miui_package_installer_apk_info")); - //禁用频繁安装应用检查 + // 禁用频繁安装应用检查 initHook(new DisableCountChecking(), mPrefsMap.getBoolean("miui_package_installer_count_checking")); } } diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/PersonalAssistant.java b/app/src/main/java/com/sevtinge/cemiuiler/module/PersonalAssistant.java index ea07b97e98..b9fbba1a34 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/PersonalAssistant.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/PersonalAssistant.java @@ -6,8 +6,6 @@ import com.sevtinge.cemiuiler.module.personalassistant.EnableFoldWidget; import com.sevtinge.cemiuiler.module.personalassistant.WidgetCrack; -import de.robv.android.xposed.callbacks.XC_LoadPackage; - public class PersonalAssistant extends BaseModule { @Override diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/Phone.java b/app/src/main/java/com/sevtinge/cemiuiler/module/Phone.java index 432fc9a4bd..73926b7810 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/Phone.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/Phone.java @@ -1,7 +1,13 @@ package com.sevtinge.cemiuiler.module; import com.sevtinge.cemiuiler.module.base.BaseModule; -import com.sevtinge.cemiuiler.module.phone.*; +import com.sevtinge.cemiuiler.module.phone.DualNrSupport; +import com.sevtinge.cemiuiler.module.phone.DualSaSupport; +import com.sevtinge.cemiuiler.module.phone.ModemFeature; +import com.sevtinge.cemiuiler.module.phone.N1BandPhone; +import com.sevtinge.cemiuiler.module.phone.N28BandPhone; +import com.sevtinge.cemiuiler.module.phone.N5N8BandPhone; +import com.sevtinge.cemiuiler.module.phone.ViceSlotVolteButton; public class Phone extends BaseModule { @Override @@ -15,4 +21,4 @@ public void handleLoadPackage() { initHook(N5N8BandPhone.INSTANCE, mPrefsMap.getBoolean("phone_n5_n8")); initHook(N28BandPhone.INSTANCE, mPrefsMap.getBoolean("phone_n28")); } -} \ No newline at end of file +} diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/Scanner.java b/app/src/main/java/com/sevtinge/cemiuiler/module/Scanner.java index a164a3eca5..cff590b566 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/Scanner.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/Scanner.java @@ -1,7 +1,10 @@ package com.sevtinge.cemiuiler.module; import com.sevtinge.cemiuiler.module.base.BaseModule; -import com.sevtinge.cemiuiler.module.scanner.*; +import com.sevtinge.cemiuiler.module.scanner.EnableCard; +import com.sevtinge.cemiuiler.module.scanner.EnableDocPpt; +import com.sevtinge.cemiuiler.module.scanner.EnableOcr; +import com.sevtinge.cemiuiler.module.scanner.EnableTranslation; import com.sevtinge.cemiuiler.module.scanner.document.EnableDocument; import com.sevtinge.cemiuiler.module.scanner.document.EnableExcel; import com.sevtinge.cemiuiler.module.scanner.document.EnablePpt; diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/ScreenRecorder.java b/app/src/main/java/com/sevtinge/cemiuiler/module/ScreenRecorder.java index a24f63495b..bdfb3b594a 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/ScreenRecorder.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/ScreenRecorder.java @@ -1,7 +1,11 @@ package com.sevtinge.cemiuiler.module; import com.sevtinge.cemiuiler.module.base.BaseModule; -import com.sevtinge.cemiuiler.module.screenrecorder.*; +import com.sevtinge.cemiuiler.module.screenrecorder.ForceSupportPlaybackCapture; +import com.sevtinge.cemiuiler.module.screenrecorder.SaveToMovies; +import com.sevtinge.cemiuiler.module.screenrecorder.ScreenRecorderConfig; +import com.sevtinge.cemiuiler.module.screenrecorder.ScreenRecorderDexKit; +import com.sevtinge.cemiuiler.module.screenrecorder.UnlockMoreVolumeFrom; public class ScreenRecorder extends BaseModule { diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/SecurityCenter.java b/app/src/main/java/com/sevtinge/cemiuiler/module/SecurityCenter.java index e8aa3301be..5e98928db4 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/SecurityCenter.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/SecurityCenter.java @@ -1,13 +1,32 @@ package com.sevtinge.cemiuiler.module; import com.sevtinge.cemiuiler.module.base.BaseModule; -import com.sevtinge.cemiuiler.module.securitycenter.*; +import com.sevtinge.cemiuiler.module.securitycenter.AppLockPinScramble; +import com.sevtinge.cemiuiler.module.securitycenter.BlurSecurity; +import com.sevtinge.cemiuiler.module.securitycenter.DisableReport; +import com.sevtinge.cemiuiler.module.securitycenter.DisableRootCheck; +import com.sevtinge.cemiuiler.module.securitycenter.FuckRiskPkg; +import com.sevtinge.cemiuiler.module.securitycenter.GetBubbleAppString; +import com.sevtinge.cemiuiler.module.securitycenter.IsSbnBelongToActiveBubbleApp; +import com.sevtinge.cemiuiler.module.securitycenter.LockOneHundredPoints; +import com.sevtinge.cemiuiler.module.securitycenter.NewBoxBlur; +import com.sevtinge.cemiuiler.module.securitycenter.RemoveConversationBubbleSettingsRestriction; +import com.sevtinge.cemiuiler.module.securitycenter.RemoveMacroBlackList; +import com.sevtinge.cemiuiler.module.securitycenter.RemoveOpenAppConfirmationPopup; +import com.sevtinge.cemiuiler.module.securitycenter.SecurityCenterDexKit; +import com.sevtinge.cemiuiler.module.securitycenter.ShowBatteryTemperatureNew; +import com.sevtinge.cemiuiler.module.securitycenter.SidebarLineCustom; +import com.sevtinge.cemiuiler.module.securitycenter.SkipCountDownLimit; +import com.sevtinge.cemiuiler.module.securitycenter.UnlockSuperWirelessCharge; import com.sevtinge.cemiuiler.module.securitycenter.app.AppDefaultSort; import com.sevtinge.cemiuiler.module.securitycenter.app.AppDetails; import com.sevtinge.cemiuiler.module.securitycenter.app.AppDisable; import com.sevtinge.cemiuiler.module.securitycenter.app.AppRestrict; - -import com.sevtinge.cemiuiler.module.securitycenter.beauty.*; +import com.sevtinge.cemiuiler.module.securitycenter.beauty.BeautyFace; +import com.sevtinge.cemiuiler.module.securitycenter.beauty.BeautyLight; +import com.sevtinge.cemiuiler.module.securitycenter.beauty.BeautyLightAuto; +import com.sevtinge.cemiuiler.module.securitycenter.beauty.BeautyPc; +import com.sevtinge.cemiuiler.module.securitycenter.beauty.BeautyPrivacy; import com.sevtinge.cemiuiler.module.securitycenter.lab.AiClipboardEnable; import com.sevtinge.cemiuiler.module.securitycenter.lab.BlurLocationEnable; import com.sevtinge.cemiuiler.module.securitycenter.lab.GetNumberEnable; @@ -20,44 +39,44 @@ public void handleLoadPackage() { initHook(new SecurityCenterDexKit()); - //应用管理 + // 应用管理 initHook(new AppDefaultSort(), mPrefsMap.getStringAsInt("security_center_app_default_sort", 0) > 0); initHook(new AppRestrict(), mPrefsMap.getBoolean("security_center_app_restrict")); initHook(new AppDisable(), mPrefsMap.getBoolean("security_center_app_disable")); initHook(new AppDetails(), mPrefsMap.getBoolean("security_center_app_details")); initHook(new DisableReport(), mPrefsMap.getBoolean("security_center_disable_ban")); - //省电与电池 - //initHook(new ShowBatteryTemperature(), mPrefsMap.getBoolean("security_center_show_battery_temperature")); + // 省电与电池 + // initHook(new ShowBatteryTemperature(), mPrefsMap.getBoolean("security_center_show_battery_temperature")); initHook(ShowBatteryTemperatureNew.INSTANCE, mPrefsMap.getBoolean("security_center_show_battery_temperature")); initHook(new UnlockSuperWirelessCharge(), mPrefsMap.getBoolean("security_center_super_wireless_charge")); - //隐私保护 + // 隐私保护 initHook(new AppLockPinScramble(), mPrefsMap.getBoolean("security_center_applock_pin_scramble")); initHook(new AiClipboardEnable(), mPrefsMap.getBoolean("security_center_ai_clipboard")); initHook(new BlurLocationEnable(), mPrefsMap.getBoolean("security_center_blur_location")); initHook(new GetNumberEnable(), mPrefsMap.getBoolean("security_center_get_number")); - //前置摄像助手 + // 前置摄像助手 initHook(new BeautyLight(), mPrefsMap.getBoolean("security_center_beauty_light")); initHook(new BeautyLightAuto(), mPrefsMap.getBoolean("security_center_beauty_light_auto")); initHook(new BeautyFace(), mPrefsMap.getBoolean("security_center_beauty_face")); initHook(new BeautyPrivacy(), mPrefsMap.getBoolean("security_center_beauty_privacy")); initHook(new BeautyPc(), mPrefsMap.getBoolean("security_center_beauty_pc")); - //其他 + // 其他 initHook(new LockOneHundredPoints(), mPrefsMap.getBoolean("security_center_score")); initHook(new SkipCountDownLimit(), mPrefsMap.getBoolean("security_center_skip_count_down_limit")); initHook(new DisableRootCheck(), mPrefsMap.getBoolean("security_center_disable_root_check")); initHook(new RemoveMacroBlackList(), mPrefsMap.getBoolean("security_center_remove_macro_black_list")); initHook(FuckRiskPkg.INSTANCE, mPrefsMap.getBoolean("security_center_disable_send_malicious_app_notification")); - //小窗和气泡通知 + // 小窗和气泡通知 initHook(new RemoveConversationBubbleSettingsRestriction(), mPrefsMap.getBoolean("security_center_remove_conversation_bubble_settings_restriction")); - initHook(IsSbnBelongToActiveBubbleApp.INSTANCE,mPrefsMap.getBoolean("security_center_unlock_side_hide_freeform")); - initHook(GetBubbleAppString.INSTANCE,mPrefsMap.getBoolean("security_center_unlock_side_hide_freeform")); + initHook(IsSbnBelongToActiveBubbleApp.INSTANCE, mPrefsMap.getBoolean("security_center_unlock_side_hide_freeform")); + initHook(GetBubbleAppString.INSTANCE, mPrefsMap.getBoolean("security_center_unlock_side_hide_freeform")); - //移除打开应用弹窗 + // 移除打开应用弹窗 initHook(new RemoveOpenAppConfirmationPopup(), mPrefsMap.getBoolean("security_center_remove_open_app_confirmation_popup")); // diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/Settings.java b/app/src/main/java/com/sevtinge/cemiuiler/module/Settings.java index 2ac79eb866..a41e273589 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/Settings.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/Settings.java @@ -1,7 +1,6 @@ package com.sevtinge.cemiuiler.module; import com.sevtinge.cemiuiler.module.base.BaseModule; -import com.sevtinge.cemiuiler.module.systemui.BluetoothRestrict; import com.sevtinge.cemiuiler.module.settings.CemiuilerSettings; import com.sevtinge.cemiuiler.module.settings.NotificationImportance; import com.sevtinge.cemiuiler.module.settings.VolumeSeparateControlForSettings; @@ -13,7 +12,7 @@ public void handleLoadPackage() { initHook(new NotificationImportance(), mPrefsMap.getBoolean("settings_notfication_importance")); - //initHook(new BluetoothRestrict(), mPrefsMap.getBoolean("various_disable_bluetooth_restrict")); + // initHook(new BluetoothRestrict(), mPrefsMap.getBoolean("various_disable_bluetooth_restrict")); initHook(new VolumeSeparateControlForSettings(), mPrefsMap.getBoolean("system_framework_volume_separate_control")); diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/SystemFramework.java b/app/src/main/java/com/sevtinge/cemiuiler/module/SystemFramework.java index 310e95e106..cc3f3d00e5 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/SystemFramework.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/SystemFramework.java @@ -1,11 +1,41 @@ package com.sevtinge.cemiuiler.module; import com.sevtinge.cemiuiler.module.base.BaseModule; +import com.sevtinge.cemiuiler.module.systemframework.AllowUntrustedTouch; +import com.sevtinge.cemiuiler.module.systemframework.AppDisableService; +import com.sevtinge.cemiuiler.module.systemframework.AppLinkVerify; +import com.sevtinge.cemiuiler.module.systemframework.CleanOpenMenu; +import com.sevtinge.cemiuiler.module.systemframework.CleanShareMenu; +import com.sevtinge.cemiuiler.module.systemframework.DeleteOnPostNotification; +import com.sevtinge.cemiuiler.module.systemframework.DisableCleaner; +import com.sevtinge.cemiuiler.module.systemframework.DisableFreeformBlackList; +import com.sevtinge.cemiuiler.module.systemframework.DisablePinVerifyPer72h; +import com.sevtinge.cemiuiler.module.systemframework.FlagSecure; +import com.sevtinge.cemiuiler.module.systemframework.FreeFormCount; +import com.sevtinge.cemiuiler.module.systemframework.FreeformBubble; +import com.sevtinge.cemiuiler.module.systemframework.IsDetailLog; +import com.sevtinge.cemiuiler.module.systemframework.LocationSimulation; +import com.sevtinge.cemiuiler.module.systemframework.MultiFreeFormSupported; import com.sevtinge.cemiuiler.module.systemframework.PackagePermissions; -import com.sevtinge.cemiuiler.module.systemframework.*; -import com.sevtinge.cemiuiler.module.systemframework.freeform.OpenAppInFreeForm; -import com.sevtinge.cemiuiler.module.systemframework.network.*; +import com.sevtinge.cemiuiler.module.systemframework.RemoveSmallWindowRestrictions; +import com.sevtinge.cemiuiler.module.systemframework.ScreenRotation; +import com.sevtinge.cemiuiler.module.systemframework.SpeedInstall; +import com.sevtinge.cemiuiler.module.systemframework.StickyFloatingWindows; +import com.sevtinge.cemiuiler.module.systemframework.ThemeProvider; +import com.sevtinge.cemiuiler.module.systemframework.UseOriginalAnimation; +import com.sevtinge.cemiuiler.module.systemframework.VolumeDefaultStream; +import com.sevtinge.cemiuiler.module.systemframework.VolumeDisableSafe; +import com.sevtinge.cemiuiler.module.systemframework.VolumeFirstPress; +import com.sevtinge.cemiuiler.module.systemframework.VolumeMediaSteps; +import com.sevtinge.cemiuiler.module.systemframework.VolumeSeparateControl; +import com.sevtinge.cemiuiler.module.systemframework.VolumeSteps; import com.sevtinge.cemiuiler.module.systemframework.corepatch.BypassSignCheckForT; +import com.sevtinge.cemiuiler.module.systemframework.freeform.OpenAppInFreeForm; +import com.sevtinge.cemiuiler.module.systemframework.network.DualNRSupport; +import com.sevtinge.cemiuiler.module.systemframework.network.DualSASupport; +import com.sevtinge.cemiuiler.module.systemframework.network.N1Band; +import com.sevtinge.cemiuiler.module.systemframework.network.N28Band; +import com.sevtinge.cemiuiler.module.systemframework.network.N5N8Band; import com.sevtinge.cemiuiler.utils.SdkHelper; @@ -16,7 +46,7 @@ public void handleLoadPackage() { initHook(new IsDetailLog()); - //小窗 + // 小窗 initHook(new FreeFormCount(), mPrefsMap.getBoolean("system_framework_freeform_count")); initHook(new FreeformBubble(), mPrefsMap.getBoolean("system_framework_freeform_bubble")); initHook(new DisableFreeformBlackList(), mPrefsMap.getBoolean("system_framework_disable_freeform_blacklist")); @@ -24,22 +54,22 @@ public void handleLoadPackage() { initHook(new StickyFloatingWindows(), mPrefsMap.getBoolean("system_framework_freeform_sticky")); initHook(MultiFreeFormSupported.INSTANCE, mPrefsMap.getBoolean("system_framework_freeform_recents_to_small_freeform")); initHook(new OpenAppInFreeForm(), mPrefsMap.getBoolean("system_framework_freeform_open_notification") || - mPrefsMap.getBoolean("system_framework_freeform_app_share") || - mPrefsMap.getBoolean("system_framework_freeform_open_notification_fw")); - //initHook(new OpenAppInFreeForm(), mPrefsMap.getBoolean("system_framework_freeform_jump")); + mPrefsMap.getBoolean("system_framework_freeform_app_share") || + mPrefsMap.getBoolean("system_framework_freeform_open_notification_fw")); + // initHook(new OpenAppInFreeForm(), mPrefsMap.getBoolean("system_framework_freeform_jump")); - //音量 + // 音量 initHook(new VolumeDefaultStream()); initHook(new VolumeFirstPress(), mPrefsMap.getBoolean("system_framework_volume_first_press")); initHook(new VolumeSeparateControl(), mPrefsMap.getBoolean("system_framework_volume_separate_control")); initHook(new VolumeSteps(), mPrefsMap.getInt("system_framework_volume_steps", 0) > 0); initHook(new VolumeMediaSteps(), mPrefsMap.getInt("system_framework_volume_media_steps", 15) > 15); initHook(new VolumeDisableSafe(), mPrefsMap.getBoolean("system_framework_volume_disable_safe")); - //initHook(new ClockShowSecond(), mPrefsMap.getBoolean("system_ui_statusbar_clock_show_second")); + // initHook(new ClockShowSecond(), mPrefsMap.getBoolean("system_ui_statusbar_clock_show_second")); initHook(new ThemeProvider(), mPrefsMap.getBoolean("hidden_function") && mPrefsMap.getBoolean("various_theme_crack")); - //核心破解 + // 核心破解 /*switch (Build.VERSION.SDK_INT) { case Build.VERSION_CODES.R : // 30 initHook(new CorePatchForR(), true); @@ -59,7 +89,7 @@ public void handleLoadPackage() { }*/ - //其他 + // 其他 initHook(new ScreenRotation(), mPrefsMap.getBoolean("system_framework_screen_all_rotations")); initHook(new CleanShareMenu(), mPrefsMap.getBoolean("system_framework_clean_share_menu")); initHook(new CleanOpenMenu(), mPrefsMap.getBoolean("system_framework_clean_open_menu")); @@ -70,22 +100,22 @@ public void handleLoadPackage() { initHook(new SpeedInstall(), mPrefsMap.getBoolean("system_framework_other_speed_install")); initHook(DeleteOnPostNotification.INSTANCE, mPrefsMap.getBoolean("system_other_delete_on_post_notification")); - //位置模拟 + // 位置模拟 initHook(new LocationSimulation(), false); - //核心破解 + // 核心破解 if (SdkHelper.isAndroidTiramisu()) { initHook(BypassSignCheckForT.INSTANCE, mPrefsMap.getBoolean("system_framework_core_patch_auth_creak")); } - //网络 + // 网络 initHook(DualNRSupport.INSTANCE, mPrefsMap.getBoolean("phone_double_5g_nr")); initHook(DualSASupport.INSTANCE, mPrefsMap.getBoolean("phone_double_5g_sa")); initHook(N1Band.INSTANCE, mPrefsMap.getBoolean("phone_n1")); initHook(N5N8Band.INSTANCE, mPrefsMap.getBoolean("phone_n5_n8")); initHook(N28Band.INSTANCE, mPrefsMap.getBoolean("phone_n28")); - //Other + // Other initHook(new PackagePermissions()); initHook(new GlobalActions(), mLoadPackageParam.processName.equals("android")); initHook(new AppDisableService()); diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/SystemFrameworkForCorePatch.java b/app/src/main/java/com/sevtinge/cemiuiler/module/SystemFrameworkForCorePatch.java index fbaa87d0c4..bc879833bc 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/SystemFrameworkForCorePatch.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/SystemFrameworkForCorePatch.java @@ -7,6 +7,7 @@ import com.sevtinge.cemiuiler.module.systemframework.corepatch.CorePatchForS; import com.sevtinge.cemiuiler.module.systemframework.corepatch.CorePatchForSv2; import com.sevtinge.cemiuiler.module.systemframework.corepatch.CorePatchForT; + import de.robv.android.xposed.IXposedHookLoadPackage; import de.robv.android.xposed.IXposedHookZygoteInit; import de.robv.android.xposed.XposedBridge; @@ -21,15 +22,14 @@ public void handleLoadPackage(XC_LoadPackage.LoadPackageParam lpparam) throws Th Log.d(TAG, "Current sdk version " + Build.VERSION.SDK_INT); switch (Build.VERSION.SDK_INT) { case Build.VERSION_CODES.TIRAMISU -> // 33 - new CorePatchForT().handleLoadPackage(lpparam); + new CorePatchForT().handleLoadPackage(lpparam); case Build.VERSION_CODES.S_V2 -> // 32 - new CorePatchForSv2().handleLoadPackage(lpparam); + new CorePatchForSv2().handleLoadPackage(lpparam); case Build.VERSION_CODES.S -> // 31 - new CorePatchForS().handleLoadPackage(lpparam); + new CorePatchForS().handleLoadPackage(lpparam); case Build.VERSION_CODES.R -> // 30 - new CorePatchForR().handleLoadPackage(lpparam); - default -> - XposedBridge.log(TAG + ": Warning: Unsupported Version of Android " + Build.VERSION.SDK_INT); + new CorePatchForR().handleLoadPackage(lpparam); + default -> XposedBridge.log(TAG + ": Warning: Unsupported Version of Android " + Build.VERSION.SDK_INT); } } } @@ -40,15 +40,14 @@ public void initZygote(StartupParam startupParam) throws Throwable { Log.d(TAG, "Current sdk version " + Build.VERSION.SDK_INT); switch (Build.VERSION.SDK_INT) { case Build.VERSION_CODES.TIRAMISU -> // 33 - new CorePatchForT().initZygote(startupParam); + new CorePatchForT().initZygote(startupParam); case Build.VERSION_CODES.S_V2 -> // 32 - new CorePatchForSv2().initZygote(startupParam); + new CorePatchForSv2().initZygote(startupParam); case Build.VERSION_CODES.S -> // 31 - new CorePatchForS().initZygote(startupParam); + new CorePatchForS().initZygote(startupParam); case Build.VERSION_CODES.R -> // 30 - new CorePatchForR().initZygote(startupParam); - default -> - XposedBridge.log(TAG + ": Warning: Unsupported Version of Android " + Build.VERSION.SDK_INT); + new CorePatchForR().initZygote(startupParam); + default -> XposedBridge.log(TAG + ": Warning: Unsupported Version of Android " + Build.VERSION.SDK_INT); } } } diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/SystemSettings.java b/app/src/main/java/com/sevtinge/cemiuiler/module/SystemSettings.java index d1ebb65b8e..02a4e78e83 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/SystemSettings.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/SystemSettings.java @@ -2,10 +2,19 @@ import android.os.Build; -import com.sevtinge.cemiuiler.module.miinput.UnlockKnuckleFunction; import com.sevtinge.cemiuiler.module.base.BaseModule; -import com.sevtinge.cemiuiler.module.systemsettings.*; -import com.sevtinge.cemiuiler.module.systemsettings.aiimage.*; +import com.sevtinge.cemiuiler.module.miinput.UnlockKnuckleFunction; +import com.sevtinge.cemiuiler.module.systemsettings.AddMiuiPlusEntry; +import com.sevtinge.cemiuiler.module.systemsettings.EnableSpeedMode; +import com.sevtinge.cemiuiler.module.systemsettings.InternationalBuild; +import com.sevtinge.cemiuiler.module.systemsettings.PermissionTopOfApp; +import com.sevtinge.cemiuiler.module.systemsettings.QuickInstallPermission; +import com.sevtinge.cemiuiler.module.systemsettings.UnLockAreaScreenshot; +import com.sevtinge.cemiuiler.module.systemsettings.ViewWifiPasswordHook; +import com.sevtinge.cemiuiler.module.systemsettings.VoipAssistantController; +import com.sevtinge.cemiuiler.module.systemsettings.aiimage.UnlockAi; +import com.sevtinge.cemiuiler.module.systemsettings.aiimage.UnlockMemc; +import com.sevtinge.cemiuiler.module.systemsettings.aiimage.UnlockSuperResolution; public class SystemSettings extends BaseModule { diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/SystemUI.java b/app/src/main/java/com/sevtinge/cemiuiler/module/SystemUI.java index e69ab8629e..b3c11eb14a 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/SystemUI.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/SystemUI.java @@ -1,16 +1,71 @@ package com.sevtinge.cemiuiler.module; import com.sevtinge.cemiuiler.module.base.BaseModule; -import com.sevtinge.cemiuiler.module.systemui.*; -import com.sevtinge.cemiuiler.module.systemui.controlcenter.*; -import com.sevtinge.cemiuiler.module.systemui.lockscreen.*; -import com.sevtinge.cemiuiler.module.systemui.navigation.*; -import com.sevtinge.cemiuiler.module.systemui.plugin.*; -import com.sevtinge.cemiuiler.module.systemui.statusbar.*; -import com.sevtinge.cemiuiler.module.systemui.statusbar.layout.StatusBarLayout; +import com.sevtinge.cemiuiler.module.systemui.BluetoothRestrict; +import com.sevtinge.cemiuiler.module.systemui.ChargeAnimationStyle; +import com.sevtinge.cemiuiler.module.systemui.MiuiGxzwSize; +import com.sevtinge.cemiuiler.module.systemui.MonetThemeOverlay; +import com.sevtinge.cemiuiler.module.systemui.NotificationFix; +import com.sevtinge.cemiuiler.module.systemui.NotificationFreeform; +import com.sevtinge.cemiuiler.module.systemui.NotificationVolumeSeparateSlider; +import com.sevtinge.cemiuiler.module.systemui.OriginChargeAnimation; +import com.sevtinge.cemiuiler.module.systemui.QSDetailBackGround; +import com.sevtinge.cemiuiler.module.systemui.StatusBarActions; +import com.sevtinge.cemiuiler.module.systemui.SwitchControlPanel; +import com.sevtinge.cemiuiler.module.systemui.controlcenter.AddBlurEffectToNotificationView; +import com.sevtinge.cemiuiler.module.systemui.controlcenter.CCGrid; +import com.sevtinge.cemiuiler.module.systemui.controlcenter.CompactNotificationsHook; +import com.sevtinge.cemiuiler.module.systemui.controlcenter.FixMediaControlPanel; +import com.sevtinge.cemiuiler.module.systemui.controlcenter.MuteVisibleNotifications; +import com.sevtinge.cemiuiler.module.systemui.controlcenter.NotificationWeather; +import com.sevtinge.cemiuiler.module.systemui.controlcenter.NotificationWeatherNew; +import com.sevtinge.cemiuiler.module.systemui.controlcenter.NotificationWeatherOld; +import com.sevtinge.cemiuiler.module.systemui.controlcenter.QQSGrid; +import com.sevtinge.cemiuiler.module.systemui.controlcenter.QSControlDetailBackgroundAlpha; +import com.sevtinge.cemiuiler.module.systemui.controlcenter.QSFiveGTile; +import com.sevtinge.cemiuiler.module.systemui.controlcenter.QSGrid; +import com.sevtinge.cemiuiler.module.systemui.controlcenter.QSGridLabels; +import com.sevtinge.cemiuiler.module.systemui.controlcenter.SmartHome; +import com.sevtinge.cemiuiler.module.systemui.lockscreen.AddBlurEffectToLockScreen; +import com.sevtinge.cemiuiler.module.systemui.lockscreen.BlurButton; +import com.sevtinge.cemiuiler.module.systemui.lockscreen.ChargingCVP; +import com.sevtinge.cemiuiler.module.systemui.lockscreen.ClockDisplaySeconds; +import com.sevtinge.cemiuiler.module.systemui.lockscreen.ForceClockUseSystemFontsHook; +import com.sevtinge.cemiuiler.module.systemui.lockscreen.LockScreenDoubleTapToSleep; +import com.sevtinge.cemiuiler.module.systemui.lockscreen.NoPasswordHook; +import com.sevtinge.cemiuiler.module.systemui.lockscreen.RemoveCamera; +import com.sevtinge.cemiuiler.module.systemui.lockscreen.RemoveSmartScreen; +import com.sevtinge.cemiuiler.module.systemui.lockscreen.ScramblePIN; +import com.sevtinge.cemiuiler.module.systemui.navigation.HandleLineCustom; +import com.sevtinge.cemiuiler.module.systemui.navigation.NavigationCustom; +import com.sevtinge.cemiuiler.module.systemui.plugin.PluginHelper; +import com.sevtinge.cemiuiler.module.systemui.statusbar.BatterySize; +import com.sevtinge.cemiuiler.module.systemui.statusbar.BigMobileNetworkType; +import com.sevtinge.cemiuiler.module.systemui.statusbar.BluetoothIcon; +import com.sevtinge.cemiuiler.module.systemui.statusbar.DisplayHardwareDetail; +import com.sevtinge.cemiuiler.module.systemui.statusbar.DoubleTapToSleep; +import com.sevtinge.cemiuiler.module.systemui.statusbar.DualRowSignalHook; +import com.sevtinge.cemiuiler.module.systemui.statusbar.HideBatteryIcon; +import com.sevtinge.cemiuiler.module.systemui.statusbar.HideStatusBarBeforeScreenshot; +import com.sevtinge.cemiuiler.module.systemui.statusbar.MobileNetwork; +import com.sevtinge.cemiuiler.module.systemui.statusbar.MobileTypeSingleHook; +import com.sevtinge.cemiuiler.module.systemui.statusbar.MobileTypeTextCustom; +import com.sevtinge.cemiuiler.module.systemui.statusbar.NotificationIconColumns; +import com.sevtinge.cemiuiler.module.systemui.statusbar.SelectiveHideIconForAlarmClock; +import com.sevtinge.cemiuiler.module.systemui.statusbar.StatusBarIcon; +import com.sevtinge.cemiuiler.module.systemui.statusbar.StatusBarIconPositionAdjust; +import com.sevtinge.cemiuiler.module.systemui.statusbar.StatusBarSimIcon; +import com.sevtinge.cemiuiler.module.systemui.statusbar.UseNewHD; +import com.sevtinge.cemiuiler.module.systemui.statusbar.WifiNetworkIndicator; +import com.sevtinge.cemiuiler.module.systemui.statusbar.WifiStandard; import com.sevtinge.cemiuiler.module.systemui.statusbar.clock.TimeCustomization; import com.sevtinge.cemiuiler.module.systemui.statusbar.clock.TimeStyle; -import com.sevtinge.cemiuiler.module.systemui.statusbar.network.*; +import com.sevtinge.cemiuiler.module.systemui.statusbar.layout.StatusBarLayout; +import com.sevtinge.cemiuiler.module.systemui.statusbar.network.NetworkSpeed; +import com.sevtinge.cemiuiler.module.systemui.statusbar.network.NetworkSpeedSec; +import com.sevtinge.cemiuiler.module.systemui.statusbar.network.NetworkSpeedSpacing; +import com.sevtinge.cemiuiler.module.systemui.statusbar.network.NetworkSpeedUnit; +import com.sevtinge.cemiuiler.module.systemui.statusbar.network.StatusBarNoNetSpeedSep; import com.sevtinge.cemiuiler.module.systemui.statusbar.network.s.NetworkSpeedWidth; import com.sevtinge.cemiuiler.utils.SdkHelper; @@ -21,20 +76,20 @@ public class SystemUI extends BaseModule { @Override public void handleLoadPackage() { - //充电动画 + // 充电动画 initHook(new ChargeAnimationStyle(), mPrefsMap.getStringAsInt("system_ui_charge_animation_style", 0) > 0); initHook(new OriginChargeAnimation(), mPrefsMap.getBoolean("system_ui_origin_charge_animation")); - //小窗 + // 小窗 initHook(new NotificationFreeform(), mPrefsMap.getBoolean("system_ui_notification_freeform")); - //禁用蓝牙临时关闭 + // 禁用蓝牙临时关闭 initHook(new BluetoothRestrict(), mPrefsMap.getBoolean("various_disable_bluetooth_restrict")); - //Monet + // Monet initHook(new MonetThemeOverlay(), mPrefsMap.getBoolean("system_ui_monet_overlay_custom")); - //状态栏图标 + // 状态栏图标 initHook(new WifiNetworkIndicator(), mPrefsMap.getStringAsInt("system_ui_status_bar_icon_wifi_network_indicator", 0) > 0); initHook(new StatusBarIcon(), true); initHook(new WifiStandard(), mPrefsMap.getStringAsInt("system_ui_status_bar_icon_wifi_standard", 0) > 0); @@ -45,23 +100,23 @@ public void handleLoadPackage() { initHook(new HideStatusBarBeforeScreenshot(), mPrefsMap.getBoolean("system_ui_status_bar_hide_icon")); initHook(StatusBarSimIcon.INSTANCE); - //移动网络图标 + // 移动网络图标 initHook(new MobileNetwork(), true); initHook(new BigMobileNetworkType(), false); initHook(new DualRowSignalHook(), mPrefsMap.getBoolean("system_ui_statusbar_network_icon_enable")); initHook(new MobileTypeSingleHook(), mPrefsMap.getBoolean("system_ui_statusbar_mobile_type_enable")); initHook(MobileTypeTextCustom.INSTANCE, !Objects.equals(mPrefsMap.getString("system_ui_status_bar_mobile_type_custom", ""), "")); - //电池相关 + // 电池相关 boolean isHideBatteryIcon = mPrefsMap.getBoolean("system_ui_status_bar_battery_icon") || - mPrefsMap.getBoolean("system_ui_status_bar_battery_percent") || - mPrefsMap.getBoolean("system_ui_status_bar_battery_percent_mark") || - mPrefsMap.getBoolean("system_ui_status_bar_battery_charging"); + mPrefsMap.getBoolean("system_ui_status_bar_battery_percent") || + mPrefsMap.getBoolean("system_ui_status_bar_battery_percent_mark") || + mPrefsMap.getBoolean("system_ui_status_bar_battery_charging"); initHook(HideBatteryIcon.INSTANCE, isHideBatteryIcon); initHook(BatterySize.INSTANCE); // initHook(new BatteryIndicator(), mPrefsMap.getBoolean("system_ui_status_bar_battery_indicator_enable")); - //网速指示器 + // 网速指示器 if (mPrefsMap.getBoolean("system_ui_statusbar_network_speed_enable_custom")) { initHook(NetworkSpeed.INSTANCE); initHook(NetworkSpeedUnit.INSTANCE); @@ -71,15 +126,15 @@ public void handleLoadPackage() { initHook(NetworkSpeedSec.INSTANCE, mPrefsMap.getBoolean("system_ui_statusbar_network_speed_sec_unit")); initHook(StatusBarNoNetSpeedSep.INSTANCE, mPrefsMap.getBoolean("system_ui_status_bar_no_netspeed_separator")); - //时钟指示器 + // 时钟指示器 initHook(TimeStyle.INSTANCE); initHook(TimeCustomization.INSTANCE, mPrefsMap.getStringAsInt("system_ui_statusbar_clock_mode", 0) != 0); - //硬件指示器 + // 硬件指示器 initHook(new DisplayHardwareDetail(), mPrefsMap.getBoolean("system_ui_statusbar_battery_enable") || - mPrefsMap.getBoolean("system_ui_statusbar_temp_enable")); + mPrefsMap.getBoolean("system_ui_statusbar_temp_enable")); - //居右显示 + // 居右显示 boolean isWiFiAtLeft = mPrefsMap.getBoolean("system_ui_status_bar_wifi_at_left"); boolean isMobileNetworkAtLeft = mPrefsMap.getBoolean("system_ui_status_bar_mobile_network_at_left"); @@ -95,55 +150,55 @@ public void handleLoadPackage() { initHook(new StatusBarIconPositionAdjust(), isStatusBarIconAtRightEnable); - //导航栏 + // 导航栏 initHook(HandleLineCustom.INSTANCE, mPrefsMap.getBoolean("system_ui_navigation_handle_custom")); initHook(new NavigationCustom(), mPrefsMap.getBoolean("system_ui_navigation_custom")); - //状态栏布局 + // 状态栏布局 initHook(StatusBarLayout.INSTANCE, mPrefsMap.getBoolean("system_ui_statusbar_layout_compatibility_mode") || - mPrefsMap.getStringAsInt("system_ui_statusbar_layout_mode", 0) != 0); - //initHook(new StatusBarHeighten()); - //initHook(new StatusBarIconSize()); + mPrefsMap.getStringAsInt("system_ui_statusbar_layout_mode", 0) != 0); + // initHook(new StatusBarHeighten()); + // initHook(new StatusBarIconSize()); - //实验性功能 + // 实验性功能 initHook(new SwitchControlPanel(), false); initHook(new MiuiGxzwSize(), false); - //控制中心 + // 控制中心 initHook(new SmartHome(), false); initHook(new QSDetailBackGround(), mPrefsMap.getInt("system_control_center_qs_detail_bg", 0) > 0); initHook(new QSFiveGTile(), mPrefsMap.getBoolean("system_control_center_5g_tile")); initHook(new QSGridLabels(), mPrefsMap.getInt("system_control_center_old_qs_rows", 1) > 1 || mPrefsMap.getBoolean("system_control_center_qs_tile_label")); initHook(new MuteVisibleNotifications(), mPrefsMap.getBoolean("system_ui_control_center_mute_visible_notice")); - //initHook(new AutoBrightness(), mPrefsMap.getBoolean("system_control_center_auto_brightness")); + // initHook(new AutoBrightness(), mPrefsMap.getBoolean("system_control_center_auto_brightness")); initHook(QSControlDetailBackgroundAlpha.INSTANCE, mPrefsMap.getInt("system_ui_control_center_control_detail_background_alpha", 255) != 255); initHook(FixMediaControlPanel.INSTANCE, mPrefsMap.getBoolean("system_ui_control_center_fix_media_control_panel")); initHook(NotificationWeather.INSTANCE, mPrefsMap.getBoolean("system_ui_control_center_show_weather")); initHook(NotificationWeatherOld.INSTANCE, mPrefsMap.getBoolean("system_ui_control_center_show_weather")); initHook(NotificationWeatherNew.INSTANCE, mPrefsMap.getBoolean("system_ui_control_center_show_weather")); initHook(CompactNotificationsHook.INSTANCE, mPrefsMap.getBoolean("system_ui_control_center_compact_notice")); - initHook(new CCGrid(), mPrefsMap.getInt("system_control_center_cc_rows", 4) > 4 || - mPrefsMap.getInt("system_control_center_cc_columns", 4) > 4 || - mPrefsMap.getBoolean("system_ui_control_center_rounded_rect") || - mPrefsMap.getBoolean("system_control_center_qs_tile_label")); + initHook(new CCGrid(), mPrefsMap.getInt("system_control_center_cc_rows", 4) > 4 || + mPrefsMap.getInt("system_control_center_cc_columns", 4) > 4 || + mPrefsMap.getBoolean("system_ui_control_center_rounded_rect") || + mPrefsMap.getBoolean("system_control_center_qs_tile_label")); initHook(new QSGrid(), mPrefsMap.getInt("system_control_center_old_qs_rows", 1) > 1 || - mPrefsMap.getInt("system_control_center_old_qs_columns", 2) > 2); + mPrefsMap.getInt("system_control_center_old_qs_columns", 2) > 2); initHook(new QQSGrid(), mPrefsMap.getInt("system_control_center_old_qs_grid_columns", 2) > 2); - //Actions + // Actions initHook(new StatusBarActions()); - //Other + // Other boolean mSeparateVolume = mPrefsMap.getBoolean("system_framework_volume_separate_control") && mPrefsMap.getBoolean("system_framework_volume_separate_slider"); initHook(new NotificationVolumeSeparateSlider(), mSeparateVolume); initHook(new NotificationFix(), mPrefsMap.getBoolean("system_ui_other_notification_fix")); - //锁屏 + // 锁屏 initHook(new ScramblePIN(), mPrefsMap.getBoolean("system_ui_lock_screen_scramble_pin")); initHook(ClockDisplaySeconds.INSTANCE, mPrefsMap.getBoolean("system_ui_lock_screen_show_second")); initHook(ChargingCVP.INSTANCE, mPrefsMap.getBoolean("system_ui_lock_screen_show_charging_cv") || - mPrefsMap.getBoolean("system_ui_show_charging_c_more") || - mPrefsMap.getBoolean("system_ui_show_charging_v_more")); + mPrefsMap.getBoolean("system_ui_show_charging_c_more") || + mPrefsMap.getBoolean("system_ui_show_charging_v_more")); initHook(RemoveCamera.INSTANCE, mPrefsMap.getBoolean("system_ui_lock_screen_hide_camera")); initHook(RemoveSmartScreen.INSTANCE, mPrefsMap.getBoolean("system_ui_lock_screen_hide_smart_screen")); initHook(NoPasswordHook.INSTANCE, mPrefsMap.getBoolean("system_ui_lock_screen_password_free")); diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/ThemeManager.java b/app/src/main/java/com/sevtinge/cemiuiler/module/ThemeManager.java index f345c705f5..c483ff3273 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/ThemeManager.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/ThemeManager.java @@ -1,9 +1,12 @@ package com.sevtinge.cemiuiler.module; import com.sevtinge.cemiuiler.module.base.BaseModule; -import com.sevtinge.cemiuiler.module.thememanager.*; - -import de.robv.android.xposed.callbacks.XC_LoadPackage; +import com.sevtinge.cemiuiler.module.thememanager.DisableThemeAdNew; +import com.sevtinge.cemiuiler.module.thememanager.EnableFoldTheme; +import com.sevtinge.cemiuiler.module.thememanager.EnablePadTheme; +import com.sevtinge.cemiuiler.module.thememanager.ThemeCrackNew; +import com.sevtinge.cemiuiler.module.thememanager.ThemeManagerDexKit; +import com.sevtinge.cemiuiler.module.thememanager.VersionCodeModify; public class ThemeManager extends BaseModule { @@ -12,12 +15,12 @@ public void handleLoadPackage() { initHook(new ThemeManagerDexKit()); initHook(new DisableThemeAdNew(), mPrefsMap.getBoolean("various_theme_diable_ads")); initHook(new ThemeCrackNew(), mPrefsMap.getBoolean("hidden_function") && mPrefsMap.getBoolean("various_theme_crack")); - //initHook(new ThemeCrack(), mPrefsMap.getBoolean("hidden_function") && mPrefsMap.getBoolean("various_theme_crack")); - //initHook(new ThemeCrack(), mPrefsMap.getBoolean("various_theme_crack")); + // initHook(new ThemeCrack(), mPrefsMap.getBoolean("hidden_function") && mPrefsMap.getBoolean("various_theme_crack")); + // initHook(new ThemeCrack(), mPrefsMap.getBoolean("various_theme_crack")); initHook(new EnablePadTheme(), mPrefsMap.getBoolean("various_theme_enable_pad_theme")); initHook(new EnableFoldTheme(), mPrefsMap.getBoolean("various_theme_enable_fold_theme")); - //修改版本号 + // 修改版本号 initHook(new VersionCodeModify(), mPrefsMap.getBoolean("theme_manager_version_code_modify")); } diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/Updater.java b/app/src/main/java/com/sevtinge/cemiuiler/module/Updater.java index b01dcd1fde..9629b99579 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/Updater.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/Updater.java @@ -1,16 +1,20 @@ package com.sevtinge.cemiuiler.module; import android.text.TextUtils; + import com.sevtinge.cemiuiler.module.base.BaseModule; -import com.sevtinge.cemiuiler.module.updater.*; +import com.sevtinge.cemiuiler.module.updater.DeviceModify; +import com.sevtinge.cemiuiler.module.updater.UpdaterDexKit; +import com.sevtinge.cemiuiler.module.updater.VabUpdate; +import com.sevtinge.cemiuiler.module.updater.VersionCodeModify; public class Updater extends BaseModule { @Override public void handleLoadPackage() { initHook(new UpdaterDexKit()); - initHook(new VersionCodeModify(), !TextUtils.isEmpty(mPrefsMap.getString("various_updater_miui_version",""))); + initHook(new VersionCodeModify(), !TextUtils.isEmpty(mPrefsMap.getString("various_updater_miui_version", ""))); initHook(new VabUpdate(), mPrefsMap.getBoolean("updater_fuck_vab")); - initHook(DeviceModify.INSTANCE, !TextUtils.isEmpty(mPrefsMap.getString("updater_device",""))); + initHook(DeviceModify.INSTANCE, !TextUtils.isEmpty(mPrefsMap.getString("updater_device", ""))); } } diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/Various.java b/app/src/main/java/com/sevtinge/cemiuiler/module/Various.java index 41ffa4c9c2..7cbc69dc96 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/Various.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/Various.java @@ -1,8 +1,11 @@ package com.sevtinge.cemiuiler.module; import com.sevtinge.cemiuiler.module.base.BaseModule; -import com.sevtinge.cemiuiler.module.various.*; -import com.sevtinge.cemiuiler.module.guardprovider.DisableUploadAppList; +import com.sevtinge.cemiuiler.module.various.CollapseMiuiTitle; +import com.sevtinge.cemiuiler.module.various.DialogCustom; +import com.sevtinge.cemiuiler.module.various.MiuiAppNoOverScroll; +import com.sevtinge.cemiuiler.module.various.NoAccessDeviceLogsRequest; +import com.sevtinge.cemiuiler.module.various.UnlockIme; import java.util.Arrays; import java.util.HashSet; @@ -32,8 +35,6 @@ public void handleLoadPackage() { } - - private boolean isMiuiOverScrollApps() { return mPrefsMap.getBoolean("various_no_overscroll") && miuiOverScrollApps.contains(mPackageName); } @@ -47,21 +48,21 @@ private boolean isCollapseMiuiTitleApps() { } HashSet miuiOverScrollApps = new HashSet(Arrays.asList( - "com.android.fileexplorer", - "com.android.providers.downloads.ui", - "com.android.settings" + "com.android.fileexplorer", + "com.android.providers.downloads.ui", + "com.android.settings" )); HashSet miuiDialogCustomApps = new HashSet(Arrays.asList( - "com.android.fileexplorer", - "com.android.providers.downloads.ui", - "com.android.settings" + "com.android.fileexplorer", + "com.android.providers.downloads.ui", + "com.android.settings" )); HashSet collapseMiuiTitleApps = new HashSet(Arrays.asList( - "com.android.fileexplorer", - "com.android.providers.downloads.ui", - "com.android.settings" + "com.android.fileexplorer", + "com.android.providers.downloads.ui", + "com.android.settings" )); diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/VoiceAssist.java b/app/src/main/java/com/sevtinge/cemiuiler/module/VoiceAssist.java index 1b4c6f1002..746fa613d5 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/VoiceAssist.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/VoiceAssist.java @@ -1,7 +1,8 @@ package com.sevtinge.cemiuiler.module; import com.sevtinge.cemiuiler.module.base.BaseModule; -import com.sevtinge.cemiuiler.module.voiceassist.*; +import com.sevtinge.cemiuiler.module.voiceassist.UseThirdPartyBrowser; +import com.sevtinge.cemiuiler.module.voiceassist.VoiceAssistDexKit; public class VoiceAssist extends BaseModule { diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/aireco/DeviceModify.java b/app/src/main/java/com/sevtinge/cemiuiler/module/aireco/DeviceModify.java index 115679ef14..3809eaf5e6 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/aireco/DeviceModify.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/aireco/DeviceModify.java @@ -1,15 +1,17 @@ package com.sevtinge.cemiuiler.module.aireco; import android.os.Build; + import com.sevtinge.cemiuiler.module.base.BaseHook; + import de.robv.android.xposed.XposedHelpers; public class DeviceModify extends BaseHook { @Override public void init() { - hookAllMethods("com.xiaomi.aireco.utils.DeviceUtils","getVoiceAssistUserAgent", new MethodHook() { - //findAndHookConstructor("com.xiaomi.market.MarketApp", new MethodHook() { + hookAllMethods("com.xiaomi.aireco.utils.DeviceUtils", "getVoiceAssistUserAgent", new MethodHook() { + // findAndHookConstructor("com.xiaomi.market.MarketApp", new MethodHook() { @Override protected void before(MethodHookParam param) throws Throwable { XposedHelpers.setStaticObjectField(Build.class, "DEVICE", "nuwa"); diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/base/BaseHook.java b/app/src/main/java/com/sevtinge/cemiuiler/module/base/BaseHook.java index 655e168a94..e936840f3e 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/base/BaseHook.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/base/BaseHook.java @@ -1,9 +1,9 @@ package com.sevtinge.cemiuiler.module.base; import com.sevtinge.cemiuiler.XposedInit; -import com.sevtinge.cemiuiler.utils.ResourcesHook; import com.sevtinge.cemiuiler.utils.LogUtils; import com.sevtinge.cemiuiler.utils.PrefsMap; +import com.sevtinge.cemiuiler.utils.ResourcesHook; import java.lang.reflect.Method; diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/base/BaseModule.java b/app/src/main/java/com/sevtinge/cemiuiler/module/base/BaseModule.java index 9abf1c0ede..5ab9feb923 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/base/BaseModule.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/base/BaseModule.java @@ -17,7 +17,8 @@ public void init(LoadPackageParam lpparam) { } @Override - public void initZygote() {} + public void initZygote() { + } public void initHook(BaseHook baseHook) { initHook(baseHook, true); diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/base/BaseXposedInit.java b/app/src/main/java/com/sevtinge/cemiuiler/module/base/BaseXposedInit.java index 8bcf84b6b1..f364bc346f 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/base/BaseXposedInit.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/base/BaseXposedInit.java @@ -50,6 +50,10 @@ import com.sevtinge.cemiuiler.utils.PrefsMap; import com.sevtinge.cemiuiler.utils.PrefsUtils; import com.sevtinge.cemiuiler.utils.ResourcesHook; + +import java.io.File; +import java.util.Map; + import de.robv.android.xposed.IXposedHookLoadPackage; import de.robv.android.xposed.IXposedHookZygoteInit; import de.robv.android.xposed.XSharedPreferences; @@ -57,9 +61,6 @@ import de.robv.android.xposed.XposedHelpers; import de.robv.android.xposed.callbacks.XC_LoadPackage.LoadPackageParam; -import java.io.File; -import java.util.Map; - public abstract class BaseXposedInit implements IXposedHookLoadPackage, IXposedHookZygoteInit { public static ResourcesHook mResHook; @@ -67,7 +68,7 @@ public abstract class BaseXposedInit implements IXposedHookLoadPackage, IXposedH public static PrefsMap mPrefsMap = new PrefsMap(); public SystemFramework mSystemFramework = new SystemFramework(); - //public SystemFrameworkForCorepatch mSystemFrameworkForCorepatch = new SystemFrameworkForCorepatch(); + // public SystemFrameworkForCorepatch mSystemFrameworkForCorepatch = new SystemFrameworkForCorepatch(); public SystemUI mSystemUI = new SystemUI(); public Home mHome = new Home(); public ScreenShot mScreenShot = new ScreenShot(); @@ -112,7 +113,7 @@ public abstract class BaseXposedInit implements IXposedHookLoadPackage, IXposedH public MiWallpaper mMiWallpaper = new MiWallpaper(); public Downloads mDownloads = new Downloads(); public Aod mAod = new Aod(); - //public SystemSettings mSystemSettings = new SystemSettings(); + // public SystemSettings mSystemSettings = new SystemSettings(); /*public void init(BaseModule... baseModules) { mPkgName = mLoadPackageParam.packageName; for (BaseModule app : baseModules) { @@ -161,22 +162,22 @@ public void setXSharedPrefs() { public void init(LoadPackageParam lpparam) { String packageName = lpparam.packageName; XposedBridge.log("Cemiuiler: packageName " + packageName); - //XposedBridge.log("Cemiuiler: R=" + Build.VERSION_CODES.R + " S=" + Build.VERSION_CODES.S + " T=" + Build.VERSION_CODES.TIRAMISU + " This=" + Build.VERSION.SDK_INT); + // XposedBridge.log("Cemiuiler: R=" + Build.VERSION_CODES.R + " S=" + Build.VERSION_CODES.S + " T=" + Build.VERSION_CODES.TIRAMISU + " This=" + Build.VERSION.SDK_INT); switch (packageName) { case "android": XposedBridge.log("Cemiuiler: Hook android"); mSystemFramework.init(lpparam); mVarious.init(lpparam); - //mSystemFrameworkForCorepatch.init(lpparam); + // mSystemFrameworkForCorepatch.init(lpparam); break; case "com.android.systemui": if (isSystemUIModuleEnable()) { XposedBridge.log("Cemiuiler: Hook com.android.systemui"); - //ALPermissionManager.RootCommand(android.content.ContextWrapper.getPackageCodePath()); + // ALPermissionManager.RootCommand(android.content.ContextWrapper.getPackageCodePath()); mSystemUI.init(lpparam); mVarious.init(lpparam); - //mSystemUIPlugin.init(lpparam); + // mSystemUIPlugin.init(lpparam); } break; diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/base/IXposedHook.java b/app/src/main/java/com/sevtinge/cemiuiler/module/base/IXposedHook.java index 3b2e3410f2..e1ca40f991 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/base/IXposedHook.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/base/IXposedHook.java @@ -1,7 +1,5 @@ package com.sevtinge.cemiuiler.module.base; -import de.robv.android.xposed.callbacks.XC_LoadPackage.LoadPackageParam; - public interface IXposedHook { void initZygote(); diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/browser/BrowserDexKit.java b/app/src/main/java/com/sevtinge/cemiuiler/module/browser/BrowserDexKit.java index 8fcd1dae6b..6cb6338aec 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/browser/BrowserDexKit.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/browser/BrowserDexKit.java @@ -1,16 +1,16 @@ package com.sevtinge.cemiuiler.module.browser; +import static com.sevtinge.cemiuiler.utils.Helpers.getPackageVersionCode; + import com.sevtinge.cemiuiler.module.base.BaseHook; -import io.luckypray.dexkit.DexKitBridge; -import io.luckypray.dexkit.builder.BatchFindArgs; -import io.luckypray.dexkit.descriptor.member.DexClassDescriptor; -import io.luckypray.dexkit.descriptor.member.DexMethodDescriptor; -import io.luckypray.dexkit.enums.MatchType; import java.util.List; import java.util.Map; -import static com.sevtinge.cemiuiler.utils.Helpers.getPackageVersionCode; +import io.luckypray.dexkit.DexKitBridge; +import io.luckypray.dexkit.builder.BatchFindArgs; +import io.luckypray.dexkit.descriptor.member.DexMethodDescriptor; +import io.luckypray.dexkit.enums.MatchType; public class BrowserDexKit extends BaseHook { @@ -26,17 +26,17 @@ public void init() { return; } mBrowserResultMethodsMap = - bridge.batchFindMethodsUsingStrings( - BatchFindArgs.builder() - .addQuery("DebugMode", List.of("pref_key_debug_mode_new")) - .addQuery("DebugMode1", List.of("pref_key_debug_mode")) - .addQuery("DebugMode2", List.of("pref_key_debug_mode_" + getPackageVersionCode(lpparam))) - .matchType(MatchType.CONTAINS) - .build() - ); + bridge.batchFindMethodsUsingStrings( + BatchFindArgs.builder() + .addQuery("DebugMode", List.of("pref_key_debug_mode_new")) + .addQuery("DebugMode1", List.of("pref_key_debug_mode")) + .addQuery("DebugMode2", List.of("pref_key_debug_mode_" + getPackageVersionCode(lpparam))) + .matchType(MatchType.CONTAINS) + .build() + ); } catch (Throwable e) { e.printStackTrace(); } bridge.close(); } -} \ No newline at end of file +} diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/browser/DebugMode.java b/app/src/main/java/com/sevtinge/cemiuiler/module/browser/DebugMode.java index 133bb15181..97b2c9d5f5 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/browser/DebugMode.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/browser/DebugMode.java @@ -1,22 +1,16 @@ package com.sevtinge.cemiuiler.module.browser; +import static com.sevtinge.cemiuiler.module.browser.BrowserDexKit.mBrowserResultMethodsMap; + import com.sevtinge.cemiuiler.module.base.BaseHook; -import de.robv.android.xposed.XC_MethodReplacement; -import de.robv.android.xposed.XposedBridge; -import de.robv.android.xposed.XposedHelpers; -import de.robv.android.xposed.callbacks.XC_LoadPackage; -import io.luckypray.dexkit.DexKitBridge; -import io.luckypray.dexkit.builder.BatchFindArgs; -import io.luckypray.dexkit.descriptor.member.DexMethodDescriptor; -import io.luckypray.dexkit.enums.MatchType; -import java.io.File; import java.lang.reflect.Method; import java.util.List; -import java.util.Map; import java.util.Objects; -import static com.sevtinge.cemiuiler.module.browser.BrowserDexKit.mBrowserResultMethodsMap; +import de.robv.android.xposed.XC_MethodReplacement; +import de.robv.android.xposed.XposedBridge; +import io.luckypray.dexkit.descriptor.member.DexMethodDescriptor; public class DebugMode extends BaseHook { @Override diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/camera/EnableLabOptions.kt b/app/src/main/java/com/sevtinge/cemiuiler/module/camera/EnableLabOptions.kt index 177cdf50b0..1cdea713fe 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/camera/EnableLabOptions.kt +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/camera/EnableLabOptions.kt @@ -2,7 +2,6 @@ package com.sevtinge.cemiuiler.module.camera import com.sevtinge.cemiuiler.module.base.BaseHook import com.sevtinge.cemiuiler.utils.hookBeforeMethod -import de.robv.android.xposed.XposedBridge object EnableLabOptions : BaseHook() { override fun init() { @@ -16,4 +15,4 @@ object EnableLabOptions : BaseHook() { logE(e) } } -} \ No newline at end of file +} diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/camera/UnlockCvlens.java b/app/src/main/java/com/sevtinge/cemiuiler/module/camera/UnlockCvlens.java index 610954140c..87fd1527c2 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/camera/UnlockCvlens.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/camera/UnlockCvlens.java @@ -1,7 +1,6 @@ package com.sevtinge.cemiuiler.module.camera; import com.sevtinge.cemiuiler.module.base.BaseHook; -import de.robv.android.xposed.XposedBridge; public class UnlockCvlens extends BaseHook { @Override diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/clock/EnableHourGlass.java b/app/src/main/java/com/sevtinge/cemiuiler/module/clock/EnableHourGlass.java index 258cc2252c..b3af2719f1 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/clock/EnableHourGlass.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/clock/EnableHourGlass.java @@ -1,25 +1,23 @@ package com.sevtinge.cemiuiler.module.clock; -import com.sevtinge.cemiuiler.module.base.BaseHook; - -import de.robv.android.xposed.XposedBridge; - import static com.sevtinge.cemiuiler.utils.Helpers.getPackageVersionCode; +import com.sevtinge.cemiuiler.module.base.BaseHook; + public class EnableHourGlass extends BaseHook { @Override public void init() { int appVersionCode = getPackageVersionCode(lpparam); - hookAllMethods("com.android.deskclock.util.Util", "isHourGlassEnable", new MethodHook() { - @Override - protected void before(MethodHookParam param) { - if (appVersionCode <= 130206400) { - param.setResult(true); - } else { - log("Your clock versionCode is " + appVersionCode); - log("Please revert to a supported version yourself"); - } + hookAllMethods("com.android.deskclock.util.Util", "isHourGlassEnable", new MethodHook() { + @Override + protected void before(MethodHookParam param) { + if (appVersionCode <= 130206400) { + param.setResult(true); + } else { + log("Your clock versionCode is " + appVersionCode); + log("Please revert to a supported version yourself"); } - }); + } + }); } } diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/contentextension/DoublePress.kt b/app/src/main/java/com/sevtinge/cemiuiler/module/contentextension/DoublePress.kt index eac488ba26..c0bc384802 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/contentextension/DoublePress.kt +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/contentextension/DoublePress.kt @@ -9,10 +9,10 @@ import com.sevtinge.cemiuiler.module.base.BaseHook class DoublePress : BaseHook() { override fun init() { loadClass("com.miui.contentextension.utils.ContentCatcherUtil").methodFinder().first { - name == "isCatcherSupportDoublePress" && - parameterTypes[0] == Context::class.java + name == "isCatcherSupportDoublePress" && + parameterTypes[0] == Context::class.java }.createHook { returnConstant(true) } } -} \ No newline at end of file +} diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/contentextension/LinkOpenMode.java b/app/src/main/java/com/sevtinge/cemiuiler/module/contentextension/LinkOpenMode.java index 5676f4d898..8e2bff1ae7 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/contentextension/LinkOpenMode.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/contentextension/LinkOpenMode.java @@ -44,10 +44,10 @@ private void setOpenIntent(Context context, Uri uri, int mode) { Intent intent = new Intent(Intent.ACTION_VIEW, uri); intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); switch (mode) { - case 0 : + case 0: setFreeFormIntent(context, getDefaultBrowserApp(context)); break; - case 2 : + case 2: intent.setPackage("com.android.browser"); setFreeFormIntent(context, "com.android.browser"); break; diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/contentextension/SuperImage.kt b/app/src/main/java/com/sevtinge/cemiuiler/module/contentextension/SuperImage.kt index 13d5ad2558..342719a004 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/contentextension/SuperImage.kt +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/contentextension/SuperImage.kt @@ -16,9 +16,9 @@ class SuperImage : BaseHook() { loadClass("com.miui.contentextension.utils.SuperImageUtils").methodFinder().first { name == "isBitmapSupportSuperImage" && - parameterTypes[0] == Bitmap::class.java + parameterTypes[0] == Bitmap::class.java }.createHook { returnConstant(true) } } -} \ No newline at end of file +} diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/contentextension/UseThirdPartyBrowser.java b/app/src/main/java/com/sevtinge/cemiuiler/module/contentextension/UseThirdPartyBrowser.java index 32e241238a..52ab83f905 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/contentextension/UseThirdPartyBrowser.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/contentextension/UseThirdPartyBrowser.java @@ -1,25 +1,25 @@ package com.sevtinge.cemiuiler.module.contentextension; import android.app.SearchManager; -import android.content.Intent; import android.content.Context; +import android.content.Intent; import android.net.Uri; import com.sevtinge.cemiuiler.module.base.BaseHook; + import de.robv.android.xposed.XC_MethodHook; import de.robv.android.xposed.XC_MethodReplacement; import de.robv.android.xposed.XposedBridge; import de.robv.android.xposed.XposedHelpers; -import de.robv.android.xposed.callbacks.XC_LoadPackage; public class UseThirdPartyBrowser extends BaseHook { @Override public void init() { - //XposedBridge.log("Hook到传送门进程!"); + // XposedBridge.log("Hook到传送门进程!"); final Class clazz = XposedHelpers.findClass("com.miui.contentextension.utils.AppsUtils", lpparam.classLoader); - //getClassInfo(clazz); + // getClassInfo(clazz); XposedHelpers.findAndHookMethod(clazz, "getIntentWithBrowser", String.class, new XC_MethodReplacement() { @Override diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/fileexplorer/SelectName.kt b/app/src/main/java/com/sevtinge/cemiuiler/module/fileexplorer/SelectName.kt index 06d5ef4840..3c80956929 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/fileexplorer/SelectName.kt +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/fileexplorer/SelectName.kt @@ -12,12 +12,12 @@ object SelectName : BaseHook() { loadClass("com.android.fileexplorer.view.FileListItem").methodFinder().first { name == "onFinishInflate" }.createHook { - after { - (it.thisObject.getObjectField("mFileNameTextView") as TextView).apply { - setTextIsSelectable(mPrefsMap.getBoolean("file_explorer_can_selectable")) - isSingleLine = mPrefsMap.getBoolean("file_explorer_is_single_line") - } - } + after { + (it.thisObject.getObjectField("mFileNameTextView") as TextView).apply { + setTextIsSelectable(mPrefsMap.getBoolean("file_explorer_can_selectable")) + isSingleLine = mPrefsMap.getBoolean("file_explorer_is_single_line") + } + } } } -} \ No newline at end of file +} diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/gallery/EnableHdrEnhance.java b/app/src/main/java/com/sevtinge/cemiuiler/module/gallery/EnableHdrEnhance.java index 2f3c13e901..b272a0616a 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/gallery/EnableHdrEnhance.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/gallery/EnableHdrEnhance.java @@ -1,6 +1,7 @@ package com.sevtinge.cemiuiler.module.gallery; import com.sevtinge.cemiuiler.module.base.BaseHook; + import de.robv.android.xposed.XC_MethodHook; public class EnableHdrEnhance extends BaseHook { @@ -13,4 +14,4 @@ protected void before(XC_MethodHook.MethodHookParam param) throws Throwable { } }); } -} \ No newline at end of file +} diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/gallery/EnableIdPhoto.java b/app/src/main/java/com/sevtinge/cemiuiler/module/gallery/EnableIdPhoto.java index 8b0dab4dda..1695e036f3 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/gallery/EnableIdPhoto.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/gallery/EnableIdPhoto.java @@ -1,31 +1,32 @@ package com.sevtinge.cemiuiler.module.gallery; import com.sevtinge.cemiuiler.module.base.BaseHook; + import de.robv.android.xposed.XC_MethodHook; public class EnableIdPhoto extends BaseHook { - @Override - public void init() { - findAndHookMethod("com.miui.mediaeditor.api.MediaEditorApiHelper", "isIDPhotoAvailable", new BaseHook.MethodHook() { - @Override - protected void before(XC_MethodHook.MethodHookParam param) throws Throwable { - param.setResult(true); - } - }); - findAndHookMethod("com.miui.gallery.domain.IDPhotoEntranceUtils", "isDeviceSupportIDPhoto", new BaseHook.MethodHook() { - @Override - protected void before(XC_MethodHook.MethodHookParam param) throws Throwable { - param.setResult(true); - } - }); - findAndHookMethod("com.miui.gallery.domain.IDPhotoEntranceUtils", "getIdType", new BaseHook.MethodHook() { - @Override - protected void before(XC_MethodHook.MethodHookParam param) throws Throwable { - param.setResult(2); - } - }); - } + @Override + public void init() { + findAndHookMethod("com.miui.mediaeditor.api.MediaEditorApiHelper", "isIDPhotoAvailable", new BaseHook.MethodHook() { + @Override + protected void before(XC_MethodHook.MethodHookParam param) throws Throwable { + param.setResult(true); + } + }); + findAndHookMethod("com.miui.gallery.domain.IDPhotoEntranceUtils", "isDeviceSupportIDPhoto", new BaseHook.MethodHook() { + @Override + protected void before(XC_MethodHook.MethodHookParam param) throws Throwable { + param.setResult(true); + } + }); + findAndHookMethod("com.miui.gallery.domain.IDPhotoEntranceUtils", "getIdType", new BaseHook.MethodHook() { + @Override + protected void before(XC_MethodHook.MethodHookParam param) throws Throwable { + param.setResult(2); + } + }); } +} diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/gallery/EnableMagicMatting.java b/app/src/main/java/com/sevtinge/cemiuiler/module/gallery/EnableMagicMatting.java index bce16df403..486f4a7bb5 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/gallery/EnableMagicMatting.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/gallery/EnableMagicMatting.java @@ -1,19 +1,20 @@ package com.sevtinge.cemiuiler.module.gallery; import com.sevtinge.cemiuiler.module.base.BaseHook; + import de.robv.android.xposed.XC_MethodHook; public class EnableMagicMatting extends BaseHook { - @Override - public void init() { - findAndHookMethod("com.miui.mediaeditor.api.MediaEditorApiHelper", "isMagicMattingAvailable", new BaseHook.MethodHook() { - @Override - protected void before(XC_MethodHook.MethodHookParam param) throws Throwable { - param.setResult(true); - } - }); - } + @Override + public void init() { + findAndHookMethod("com.miui.mediaeditor.api.MediaEditorApiHelper", "isMagicMattingAvailable", new BaseHook.MethodHook() { + @Override + protected void before(XC_MethodHook.MethodHookParam param) throws Throwable { + param.setResult(true); + } + }); } +} diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/gallery/EnableMagicSky.java b/app/src/main/java/com/sevtinge/cemiuiler/module/gallery/EnableMagicSky.java index 44081b53f0..6f6bccf257 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/gallery/EnableMagicSky.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/gallery/EnableMagicSky.java @@ -1,6 +1,7 @@ package com.sevtinge.cemiuiler.module.gallery; import com.sevtinge.cemiuiler.module.base.BaseHook; + import de.robv.android.xposed.XC_MethodHook; public class EnableMagicSky extends BaseHook { diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/gallery/EnableOcr.java b/app/src/main/java/com/sevtinge/cemiuiler/module/gallery/EnableOcr.java index 64a1f04d8e..ce2819c7fc 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/gallery/EnableOcr.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/gallery/EnableOcr.java @@ -1,6 +1,7 @@ package com.sevtinge.cemiuiler.module.gallery; import com.sevtinge.cemiuiler.module.base.BaseHook; + import de.robv.android.xposed.XC_MethodHook; public class EnableOcr extends BaseHook { diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/gallery/EnableOcrForm.java b/app/src/main/java/com/sevtinge/cemiuiler/module/gallery/EnableOcrForm.java index ae4a5e4d38..2649507e85 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/gallery/EnableOcrForm.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/gallery/EnableOcrForm.java @@ -1,19 +1,20 @@ package com.sevtinge.cemiuiler.module.gallery; import com.sevtinge.cemiuiler.module.base.BaseHook; + import de.robv.android.xposed.XC_MethodHook; public class EnableOcrForm extends BaseHook { - @Override - public void init() { - findAndHookMethod("com.miui.gallery.util.RecognizeFormUtil", "isAvailable", new BaseHook.MethodHook() { - @Override - protected void before(XC_MethodHook.MethodHookParam param) throws Throwable { - param.setResult(true); - } - }); - } + @Override + public void init() { + findAndHookMethod("com.miui.gallery.util.RecognizeFormUtil", "isAvailable", new BaseHook.MethodHook() { + @Override + protected void before(XC_MethodHook.MethodHookParam param) throws Throwable { + param.setResult(true); + } + }); } +} diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/gallery/EnablePdf.java b/app/src/main/java/com/sevtinge/cemiuiler/module/gallery/EnablePdf.java index 60de1cae1e..4ee280bebe 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/gallery/EnablePdf.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/gallery/EnablePdf.java @@ -1,6 +1,7 @@ package com.sevtinge.cemiuiler.module.gallery; import com.sevtinge.cemiuiler.module.base.BaseHook; + import de.robv.android.xposed.XC_MethodHook; public class EnablePdf extends BaseHook { diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/gallery/EnablePhotoMovie.java b/app/src/main/java/com/sevtinge/cemiuiler/module/gallery/EnablePhotoMovie.java index 07e815fe67..d3557f295c 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/gallery/EnablePhotoMovie.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/gallery/EnablePhotoMovie.java @@ -1,23 +1,24 @@ package com.sevtinge.cemiuiler.module.gallery; import com.sevtinge.cemiuiler.module.base.BaseHook; + import de.robv.android.xposed.XC_MethodHook; public class EnablePhotoMovie extends BaseHook { - @Override - public void init() { - findAndHookMethod("com.miui.mediaeditor.api.MediaEditorApiHelper", "isPhotoMovieAvailable", new BaseHook.MethodHook() { - @Override - protected void before(XC_MethodHook.MethodHookParam param) throws Throwable { - param.setResult(true); - } - }); - findAndHookMethod("com.miui.gallery.domain.DeviceFeature", "isDeviceSupportPhotoMovie", new BaseHook.MethodHook() { - @Override - protected void before(XC_MethodHook.MethodHookParam param) throws Throwable { - param.setResult(true); - } - }); - } + @Override + public void init() { + findAndHookMethod("com.miui.mediaeditor.api.MediaEditorApiHelper", "isPhotoMovieAvailable", new BaseHook.MethodHook() { + @Override + protected void before(XC_MethodHook.MethodHookParam param) throws Throwable { + param.setResult(true); + } + }); + findAndHookMethod("com.miui.gallery.domain.DeviceFeature", "isDeviceSupportPhotoMovie", new BaseHook.MethodHook() { + @Override + protected void before(XC_MethodHook.MethodHookParam param) throws Throwable { + param.setResult(true); + } + }); } +} diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/gallery/EnableRemover2.java b/app/src/main/java/com/sevtinge/cemiuiler/module/gallery/EnableRemover2.java index c50cfa2a9a..628e766c02 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/gallery/EnableRemover2.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/gallery/EnableRemover2.java @@ -1,6 +1,7 @@ package com.sevtinge.cemiuiler.module.gallery; import com.sevtinge.cemiuiler.module.base.BaseHook; + import de.robv.android.xposed.XC_MethodHook; public class EnableRemover2 extends BaseHook { diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/gallery/EnableTextYanhua.java b/app/src/main/java/com/sevtinge/cemiuiler/module/gallery/EnableTextYanhua.java index 2eb95b5af7..0c39796fe8 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/gallery/EnableTextYanhua.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/gallery/EnableTextYanhua.java @@ -1,6 +1,7 @@ package com.sevtinge.cemiuiler.module.gallery; import com.sevtinge.cemiuiler.module.base.BaseHook; + import de.robv.android.xposed.XC_MethodHook; public class EnableTextYanhua extends BaseHook { diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/gallery/EnableVideoEditor.java b/app/src/main/java/com/sevtinge/cemiuiler/module/gallery/EnableVideoEditor.java index 67cdbecf8f..94c72905b9 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/gallery/EnableVideoEditor.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/gallery/EnableVideoEditor.java @@ -1,25 +1,26 @@ package com.sevtinge.cemiuiler.module.gallery; import com.sevtinge.cemiuiler.module.base.BaseHook; + import de.robv.android.xposed.XC_MethodHook; public class EnableVideoEditor extends BaseHook { - @Override - public void init() { - findAndHookMethod("com.miui.mediaeditor.api.MediaEditorApiHelper", "isVideoEditorAvailable", new BaseHook.MethodHook() { - @Override - protected void before(XC_MethodHook.MethodHookParam param) throws Throwable { - param.setResult(true); - } - }); - findAndHookMethod("com.miui.mediaeditor.api.MediaEditorApiHelper", "isVlogAvailable", new BaseHook.MethodHook() { - @Override - protected void before(XC_MethodHook.MethodHookParam param) throws Throwable { - param.setResult(true); - } - }); - } + @Override + public void init() { + findAndHookMethod("com.miui.mediaeditor.api.MediaEditorApiHelper", "isVideoEditorAvailable", new BaseHook.MethodHook() { + @Override + protected void before(XC_MethodHook.MethodHookParam param) throws Throwable { + param.setResult(true); + } + }); + findAndHookMethod("com.miui.mediaeditor.api.MediaEditorApiHelper", "isVlogAvailable", new BaseHook.MethodHook() { + @Override + protected void before(XC_MethodHook.MethodHookParam param) throws Throwable { + param.setResult(true); + } + }); } +} diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/gallery/EnableVideoPost.java b/app/src/main/java/com/sevtinge/cemiuiler/module/gallery/EnableVideoPost.java index 21961cb500..24077f4f08 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/gallery/EnableVideoPost.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/gallery/EnableVideoPost.java @@ -1,19 +1,20 @@ package com.sevtinge.cemiuiler.module.gallery; import com.sevtinge.cemiuiler.module.base.BaseHook; + import de.robv.android.xposed.XC_MethodHook; public class EnableVideoPost extends BaseHook { - @Override - public void init() { - findAndHookMethod("com.miui.mediaeditor.api.MediaEditorApiHelper", "isVideoPostAvailable", new BaseHook.MethodHook() { - @Override - protected void before(XC_MethodHook.MethodHookParam param) throws Throwable { - param.setResult(true); - } - }); - } + @Override + public void init() { + findAndHookMethod("com.miui.mediaeditor.api.MediaEditorApiHelper", "isVideoPostAvailable", new BaseHook.MethodHook() { + @Override + protected void before(XC_MethodHook.MethodHookParam param) throws Throwable { + param.setResult(true); + } + }); } +} diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/guardprovider/DisableUploadAppList.java b/app/src/main/java/com/sevtinge/cemiuiler/module/guardprovider/DisableUploadAppList.java index 6628a85a03..46f0ac95af 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/guardprovider/DisableUploadAppList.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/guardprovider/DisableUploadAppList.java @@ -1,7 +1,7 @@ package com.sevtinge.cemiuiler.module.guardprovider; import com.sevtinge.cemiuiler.module.base.BaseHook; -import de.robv.android.xposed.XposedBridge; + import org.json.JSONArray; import org.json.JSONObject; @@ -10,6 +10,7 @@ import java.util.List; import de.robv.android.xposed.XC_MethodHook; +import de.robv.android.xposed.XposedBridge; import de.robv.android.xposed.XposedHelpers; public class DisableUploadAppList extends BaseHook { diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/guardprovider/GuardProviderDexKit.java b/app/src/main/java/com/sevtinge/cemiuiler/module/guardprovider/GuardProviderDexKit.java index 497739efd4..70a1286caa 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/guardprovider/GuardProviderDexKit.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/guardprovider/GuardProviderDexKit.java @@ -1,14 +1,15 @@ package com.sevtinge.cemiuiler.module.guardprovider; import com.sevtinge.cemiuiler.module.base.BaseHook; + +import java.util.List; +import java.util.Map; + import io.luckypray.dexkit.DexKitBridge; import io.luckypray.dexkit.builder.BatchFindArgs; import io.luckypray.dexkit.descriptor.member.DexMethodDescriptor; import io.luckypray.dexkit.enums.MatchType; -import java.util.List; -import java.util.Map; - public class GuardProviderDexKit extends BaseHook { public static Map> mGuardProviderResultMethodsMap; @@ -23,15 +24,15 @@ public void init() { return; } mGuardProviderResultMethodsMap = - bridge.batchFindMethodsUsingStrings( - BatchFindArgs.builder() - .addQuery("AntiDefraudAppManager", List.of("AntiDefraudAppManager", "https://flash.sec.miui.com/detect/app")) - .matchType(MatchType.CONTAINS) - .build() - ); + bridge.batchFindMethodsUsingStrings( + BatchFindArgs.builder() + .addQuery("AntiDefraudAppManager", List.of("AntiDefraudAppManager", "https://flash.sec.miui.com/detect/app")) + .matchType(MatchType.CONTAINS) + .build() + ); } catch (Throwable e) { e.printStackTrace(); } bridge.close(); } -} \ No newline at end of file +} diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/home/DoubleTap.java b/app/src/main/java/com/sevtinge/cemiuiler/module/home/DoubleTap.java index ec6545e0ea..20d103d154 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/home/DoubleTap.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/home/DoubleTap.java @@ -31,13 +31,13 @@ protected void after(MethodHookParam param) throws Throwable { findAndHookMethod(mWorkspace, "dispatchTouchEvent", MotionEvent.class, new MethodHook() { @Override protected void before(MethodHookParam param) throws Throwable { - DoubleTapController mDoubleTapControllerEx = (DoubleTapController)XposedHelpers.getAdditionalInstanceField(param.thisObject, "mDoubleTapControllerEx"); + DoubleTapController mDoubleTapControllerEx = (DoubleTapController) XposedHelpers.getAdditionalInstanceField(param.thisObject, "mDoubleTapControllerEx"); if (mDoubleTapControllerEx == null) return; - if (!mDoubleTapControllerEx.isDoubleTapEvent((MotionEvent)param.args[0])) return; + if (!mDoubleTapControllerEx.isDoubleTapEvent((MotionEvent) param.args[0])) return; int mCurrentScreenIndex = XposedHelpers.getIntField(param.thisObject, lpparam.packageName.equals("com.miui.home") ? "mCurrentScreenIndex" : "mCurrentScreen"); Object cellLayout = XposedHelpers.callMethod(param.thisObject, "getCellLayout", mCurrentScreenIndex); - if ((boolean)XposedHelpers.callMethod(cellLayout, "lastDownOnOccupiedCell")) return; - if ((boolean)XposedHelpers.callMethod(param.thisObject, "isInNormalEditingMode")) return; + if ((boolean) XposedHelpers.callMethod(cellLayout, "lastDownOnOccupiedCell")) return; + if ((boolean) XposedHelpers.callMethod(param.thisObject, "isInNormalEditingMode")) return; mDoubleTapControllerEx.onDoubleTapEvent(); } }); @@ -75,7 +75,7 @@ boolean isDoubleTapEvent(MotionEvent motionEvent) { float rawY = motionEvent.getRawY(); if (Math.abs(rawX - this.mActionDownRawX) <= ((float) this.mTouchSlop) && Math.abs(rawY - this.mActionDownRawY) <= ((float) this.mTouchSlop)) { long MAX_DURATION = 500; - if (SystemClock.elapsedRealtime() - this.mLastClickTime > MAX_DURATION || rawY - this.mFirstClickRawY > (float)this.mTouchSlop || rawX - this.mFirstClickRawX > (float)this.mTouchSlop) { + if (SystemClock.elapsedRealtime() - this.mLastClickTime > MAX_DURATION || rawY - this.mFirstClickRawY > (float) this.mTouchSlop || rawX - this.mFirstClickRawX > (float) this.mTouchSlop) { this.mClickCount = 0; } this.mClickCount++; diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/home/FreeFormCountForHome.java b/app/src/main/java/com/sevtinge/cemiuiler/module/home/FreeFormCountForHome.java index 0e330d01cc..9c2b3b54cd 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/home/FreeFormCountForHome.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/home/FreeFormCountForHome.java @@ -13,11 +13,11 @@ public void init() { mRecentsAndFSGesture = findClassIfExists("com.miui.home.launcher.RecentsAndFSGestureUtils"); hookAllMethods(mRecentsAndFSGesture, - "canTaskEnterMiniSmallWindow", - XC_MethodReplacement.returnConstant(true)); + "canTaskEnterMiniSmallWindow", + XC_MethodReplacement.returnConstant(true)); hookAllMethods(mRecentsAndFSGesture, - "canTaskEnterSmallWindow", - XC_MethodReplacement.returnConstant(true)); + "canTaskEnterSmallWindow", + XC_MethodReplacement.returnConstant(true)); } } diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/home/HomePortraitReverse.java b/app/src/main/java/com/sevtinge/cemiuiler/module/home/HomePortraitReverse.java index d17d228cff..21deacd251 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/home/HomePortraitReverse.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/home/HomePortraitReverse.java @@ -13,7 +13,7 @@ public void init() { findAndHookMethod("com.miui.home.launcher.Launcher", "onCreate", Bundle.class, new MethodHook() { @Override protected void after(MethodHookParam param) throws Throwable { - Activity act = (Activity)param.thisObject; + Activity act = (Activity) param.thisObject; act.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_SENSOR_PORTRAIT); } }); diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/home/HotSeatSwipe.java b/app/src/main/java/com/sevtinge/cemiuiler/module/home/HotSeatSwipe.java index 9fd04b3340..d0a37799df 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/home/HotSeatSwipe.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/home/HotSeatSwipe.java @@ -17,13 +17,14 @@ public void init() { findAndHookMethod("com.miui.home.launcher.hotseats.HotSeats", "dispatchTouchEvent", MotionEvent.class, new MethodHook() { @Override protected void before(final MethodHookParam param) throws Throwable { - MotionEvent ev = (MotionEvent)param.args[0]; + MotionEvent ev = (MotionEvent) param.args[0]; if (ev == null) return; - ViewGroup hotSeat = (ViewGroup)param.thisObject; + ViewGroup hotSeat = (ViewGroup) param.thisObject; Context helperContext = hotSeat.getContext(); if (helperContext == null) return; - if (mDetectorHorizontal == null) mDetectorHorizontal = new GestureDetector(helperContext, new SwipeListenerHorizontal(hotSeat)); + if (mDetectorHorizontal == null) + mDetectorHorizontal = new GestureDetector(helperContext, new SwipeListenerHorizontal(hotSeat)); mDetectorHorizontal.onTouchEvent(ev); } }); @@ -38,7 +39,7 @@ private static class SwipeListenerHorizontal extends GestureDetector.SimpleOnGes final Context helperContext; SwipeListenerHorizontal(Object cellLayout) { - helperContext = ((ViewGroup)cellLayout).getContext(); + helperContext = ((ViewGroup) cellLayout).getContext(); float density = helperContext.getResources().getDisplayMetrics().density; SWIPE_MIN_DISTANCE_HORIZ = Math.round(75 * density); SWIPE_THRESHOLD_VELOCITY = Math.round(33 * density); diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/home/ScreenSwipe.java b/app/src/main/java/com/sevtinge/cemiuiler/module/home/ScreenSwipe.java index 6b085a50a1..7b0321d28f 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/home/ScreenSwipe.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/home/ScreenSwipe.java @@ -31,16 +31,16 @@ public void init() { protected void before(MethodHookParam param) throws Throwable { if ((boolean) XposedHelpers.callMethod(param.thisObject, "isInNormalEditingMode")) return; String key = null; - Context helperContext = ((ViewGroup)param.thisObject).getContext(); + Context helperContext = ((ViewGroup) param.thisObject).getContext(); int numOfFingers = 1; - if (param.args[1] != null) numOfFingers = ((MotionEvent)param.args[1]).getPointerCount(); - if ((int)param.args[0] == 11) { + if (param.args[1] != null) numOfFingers = ((MotionEvent) param.args[1]).getPointerCount(); + if ((int) param.args[0] == 11) { if (numOfFingers == 1) key = "prefs_key_home_gesture_down_swipe"; else if (numOfFingers == 2) key = "prefs_key_home_gesture_down_swipe2"; if (GlobalActions.handleAction(helperContext, key)) param.setResult(true); - } else if ((int)param.args[0] == 10) { + } else if ((int) param.args[0] == 10) { if (numOfFingers == 1) key = "prefs_key_home_gesture_up_swipe"; else if (numOfFingers == 2) @@ -53,8 +53,8 @@ else if (numOfFingers == 2) findAndHookMethod(mLauncher, "onCreate", Bundle.class, new MethodHook() { @Override protected void after(final MethodHookParam param) throws Throwable { - final Activity act = (Activity)param.thisObject; - Handler mHandler = (Handler)XposedHelpers.getObjectField(act, "mHandler"); + final Activity act = (Activity) param.thisObject; + Handler mHandler = (Handler) XposedHelpers.getObjectField(act, "mHandler"); new PrefsUtils.SharedPrefsObserver(act, mHandler) { @Override public void onChange(Uri uri) { @@ -92,7 +92,8 @@ protected void before(final MethodHookParam param) throws Throwable { findAndHookMethodSilently("com.miui.home.launcher.allapps.LauncherMode", "getPullDownGesture", Context.class, new MethodHook() { @Override protected void after(final MethodHookParam param) throws Throwable { - if (PrefsUtils.getSharedIntPrefs((Context)param.args[0], "prefs_key_home_gesture_down_swipe_action", 1) > 1) param.setResult("no_action"); + if (PrefsUtils.getSharedIntPrefs((Context) param.args[0], "prefs_key_home_gesture_down_swipe_action", 1) > 1) + param.setResult("no_action"); } }); @@ -100,42 +101,48 @@ protected void after(final MethodHookParam param) throws Throwable { findAndHookMethodSilently("com.miui.home.launcher.allapps.LauncherMode", "getSlideUpGesture", Context.class, new MethodHook() { @Override protected void before(final MethodHookParam param) throws Throwable { - if (PrefsUtils.getSharedIntPrefs((Context)param.args[0], "prefs_key_home_gesture_up_swipe_action", 0) > 0) param.setResult("no_action"); + if (PrefsUtils.getSharedIntPrefs((Context) param.args[0], "prefs_key_home_gesture_up_swipe_action", 0) > 0) + param.setResult("no_action"); } }); if (findAndHookMethodSilently("com.miui.home.launcher.DeviceConfig", "isGlobalSearchEnable", Context.class, new MethodHook() { @Override protected void before(final MethodHookParam param) throws Throwable { - if (PrefsUtils.getSharedIntPrefs((Context)param.args[0], "prefs_key_home_gesture_up_swipe_action", 0) > 0) param.setResult(false); + if (PrefsUtils.getSharedIntPrefs((Context) param.args[0], "prefs_key_home_gesture_up_swipe_action", 0) > 0) + param.setResult(false); } })) { findAndHookMethodSilently("com.miui.home.launcher.search.SearchEdgeLayout", "isTopSearchEnable", new MethodHook() { @Override protected void before(final MethodHookParam param) throws Throwable { - View view = (View)param.thisObject; - if (PrefsUtils.getSharedIntPrefs(view.getContext(), "prefs_key_home_gesture_down_swipe_action", 0) > 0) param.setResult(false); + View view = (View) param.thisObject; + if (PrefsUtils.getSharedIntPrefs(view.getContext(), "prefs_key_home_gesture_down_swipe_action", 0) > 0) + param.setResult(false); } }); findAndHookMethodSilently("com.miui.home.launcher.search.SearchEdgeLayout", "isBottomGlobalSearchEnable", new MethodHook() { @Override protected void before(final MethodHookParam param) throws Throwable { - View view = (View)param.thisObject; - if (PrefsUtils.getSharedIntPrefs(view.getContext(), "prefs_key_home_gesture_up_swipe_action", 0) > 0) param.setResult(false); + View view = (View) param.thisObject; + if (PrefsUtils.getSharedIntPrefs(view.getContext(), "prefs_key_home_gesture_up_swipe_action", 0) > 0) + param.setResult(false); } }); findAndHookMethodSilently("com.miui.home.launcher.DeviceConfig", "isGlobalSearchBottomEffectEnable", Context.class, new MethodHook() { @Override protected void before(final MethodHookParam param) throws Throwable { - if (PrefsUtils.getSharedIntPrefs((Context)param.args[0], "prefs_key_home_gesture_up_swipe_action", 0) > 0) param.setResult(false); + if (PrefsUtils.getSharedIntPrefs((Context) param.args[0], "prefs_key_home_gesture_up_swipe_action", 0) > 0) + param.setResult(false); } }); } else if (!findAndHookMethodSilently("com.miui.home.launcher.DeviceConfig", "allowedSlidingUpToStartGolbalSearch", Context.class, new MethodHook() { @Override protected void before(final MethodHookParam param) throws Throwable { - if (PrefsUtils.getSharedIntPrefs((Context)param.args[0], "prefs_key_home_gesture_up_swipe_action", 0) > 0) param.setResult(false); + if (PrefsUtils.getSharedIntPrefs((Context) param.args[0], "prefs_key_home_gesture_up_swipe_action", 0) > 0) + param.setResult(false); } })) if (lpparam.packageName.equals("com.miui.home")) LogUtils.logXp(TAG, "Cannot disable swipe up search"); } diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/home/SeekPoints.java b/app/src/main/java/com/sevtinge/cemiuiler/module/home/SeekPoints.java index 46e7b0839a..dbf654cf60 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/home/SeekPoints.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/home/SeekPoints.java @@ -19,28 +19,28 @@ public void init() { findAndHookMethod("com.miui.home.launcher.ScreenView", "updateSeekPoints", int.class, new MethodHook() { @Override protected void before(final MethodHookParam param) throws Throwable { - showSeekBar((View)param.thisObject); + showSeekBar((View) param.thisObject); } }); findAndHookMethod("com.miui.home.launcher.ScreenView", "addView", View.class, int.class, ViewGroup.LayoutParams.class, new MethodHook() { @Override protected void before(final MethodHookParam param) throws Throwable { - showSeekBar((View)param.thisObject); + showSeekBar((View) param.thisObject); } }); findAndHookMethod("com.miui.home.launcher.ScreenView", "removeScreen", int.class, new MethodHook() { @Override protected void before(final MethodHookParam param) throws Throwable { - showSeekBar((View)param.thisObject); + showSeekBar((View) param.thisObject); } }); findAndHookMethod("com.miui.home.launcher.ScreenView", "removeScreensInLayout", int.class, int.class, new MethodHook() { @Override protected void before(final MethodHookParam param) throws Throwable { - showSeekBar((View)param.thisObject); + showSeekBar((View) param.thisObject); } }); } @@ -48,18 +48,18 @@ protected void before(final MethodHookParam param) throws Throwable { private void showSeekBar(View workspace) { if (!"Workspace".equals(workspace.getClass().getSimpleName())) return; boolean isInEditingMode = (boolean) XposedHelpers.callMethod(workspace, "isInNormalEditingMode"); - View mScreenSeekBar = (View)XposedHelpers.getObjectField(workspace, "mScreenSeekBar"); + View mScreenSeekBar = (View) XposedHelpers.getObjectField(workspace, "mScreenSeekBar"); if (mScreenSeekBar == null) { LogUtils.log("HideSeekPointsHook Cannot find seekbar"); return; } Context mContext = workspace.getContext(); - Handler mHandler = (Handler)XposedHelpers.getAdditionalInstanceField(workspace, "mHandlerEx"); + Handler mHandler = (Handler) XposedHelpers.getAdditionalInstanceField(workspace, "mHandlerEx"); if (mHandler == null) { mHandler = new Handler(mContext.getMainLooper()) { @Override public void handleMessage(Message msg) { - View seekBar = (View)msg.obj; + View seekBar = (View) msg.obj; if (seekBar != null) seekBar.animate().alpha(0.0f).setDuration(600).withEndAction(new Runnable() { @Override @@ -77,7 +77,7 @@ public void run() { } if (mHandler.hasMessages(666)) mHandler.removeMessages(666); mScreenSeekBar.animate().cancel(); - if (!isInEditingMode && XposedInit.mPrefsMap.getStringAsInt("home_other_seek_points",0) == 2) { + if (!isInEditingMode && XposedInit.mPrefsMap.getStringAsInt("home_other_seek_points", 0) == 2) { mScreenSeekBar.setAlpha(0.0f); mScreenSeekBar.setVisibility(View.GONE); return; diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/home/SetDeviceLevel.kt b/app/src/main/java/com/sevtinge/cemiuiler/module/home/SetDeviceLevel.kt index a3dbed079a..81d1aea51d 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/home/SetDeviceLevel.kt +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/home/SetDeviceLevel.kt @@ -132,11 +132,11 @@ object SetDeviceLevel : BaseHook() { Log.ex(e) } try { - "com.xiaomi.onetrack.OneTrack".hookBeforeMethod( "isDisable") { + "com.xiaomi.onetrack.OneTrack".hookBeforeMethod("isDisable") { it.result = true } } catch (e: Throwable) { Log.ex(e) } } -} \ No newline at end of file +} diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/home/ShakeDevice.java b/app/src/main/java/com/sevtinge/cemiuiler/module/home/ShakeDevice.java index 724731fb48..85328e2ef1 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/home/ShakeDevice.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/home/ShakeDevice.java @@ -20,11 +20,11 @@ public void init() { protected void after(final MethodHookParam param) throws Throwable { ShakeManager shakeMgr = (ShakeManager) XposedHelpers.getAdditionalInstanceField(param.thisObject, shakeMgrKey); if (shakeMgr == null) { - shakeMgr = new ShakeManager((Context)param.thisObject); + shakeMgr = new ShakeManager((Context) param.thisObject); XposedHelpers.setAdditionalInstanceField(param.thisObject, shakeMgrKey, shakeMgr); } - Activity launcherActivity = (Activity)param.thisObject; - SensorManager sensorMgr = (SensorManager)launcherActivity.getSystemService(Context.SENSOR_SERVICE); + Activity launcherActivity = (Activity) param.thisObject; + SensorManager sensorMgr = (SensorManager) launcherActivity.getSystemService(Context.SENSOR_SERVICE); shakeMgr.reset(); sensorMgr.registerListener(shakeMgr, sensorMgr.getDefaultSensor(Sensor.TYPE_ACCELEROMETER), SensorManager.SENSOR_DELAY_NORMAL); } @@ -34,9 +34,9 @@ protected void after(final MethodHookParam param) throws Throwable { @Override protected void after(final MethodHookParam param) throws Throwable { if (XposedHelpers.getAdditionalInstanceField(param.thisObject, shakeMgrKey) == null) return; - Activity launcherActivity = (Activity)param.thisObject; - SensorManager sensorMgr = (SensorManager)launcherActivity.getSystemService(Context.SENSOR_SERVICE); - sensorMgr.unregisterListener((ShakeManager)XposedHelpers.getAdditionalInstanceField(param.thisObject, shakeMgrKey)); + Activity launcherActivity = (Activity) param.thisObject; + SensorManager sensorMgr = (SensorManager) launcherActivity.getSystemService(Context.SENSOR_SERVICE); + sensorMgr.unregisterListener((ShakeManager) XposedHelpers.getAdditionalInstanceField(param.thisObject, shakeMgrKey)); } }); } diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/home/dock/DockCustom.java b/app/src/main/java/com/sevtinge/cemiuiler/module/home/dock/DockCustom.java index 173b900b57..cd697e0a15 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/home/dock/DockCustom.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/home/dock/DockCustom.java @@ -49,9 +49,9 @@ protected void after(MethodHookParam param) throws Throwable { FrameLayout mSearchBarContainer = (FrameLayout) XposedHelpers.callMethod(param.thisObject, "getSearchBarContainer"); FrameLayout mSearchEdgeLayout = (FrameLayout) mSearchBarContainer.getParent(); - int mDockHeight = DisplayUtils.dip2px(mSearchBarContainer.getContext(), XposedInit.mPrefsMap.getInt("home_dock_bg_height",80)); - int mDockMargin = DisplayUtils.dip2px(mSearchBarContainer.getContext(), XposedInit.mPrefsMap.getInt("home_dock_bg_margin_horizontal",30)); - int mDockBottomMargin = DisplayUtils.dip2px(mSearchBarContainer.getContext(), XposedInit.mPrefsMap.getInt("home_dock_bg_margin_bottom",30)); + int mDockHeight = DisplayUtils.dip2px(mSearchBarContainer.getContext(), XposedInit.mPrefsMap.getInt("home_dock_bg_height", 80)); + int mDockMargin = DisplayUtils.dip2px(mSearchBarContainer.getContext(), XposedInit.mPrefsMap.getInt("home_dock_bg_margin_horizontal", 30)); + int mDockBottomMargin = DisplayUtils.dip2px(mSearchBarContainer.getContext(), XposedInit.mPrefsMap.getInt("home_dock_bg_margin_bottom", 30)); mDockView = new FrameLayout(mSearchBarContainer.getContext()); FrameLayout.LayoutParams layoutParams = new FrameLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, mDockHeight); @@ -101,7 +101,7 @@ protected void after(MethodHookParam param) throws Throwable { } }); - findAndHookMethod(mLauncherCls,"onStateSetStart", mLauncherStateCls, new MethodHook() { + findAndHookMethod(mLauncherCls, "onStateSetStart", mLauncherStateCls, new MethodHook() { @Override protected void after(MethodHookParam param) throws Throwable { if (param.args[0].getClass().getSimpleName().equals("LauncherState") && !isFolderShowing && !isShowEditPanel) { diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/home/dock/FoldDeviceDock.kt b/app/src/main/java/com/sevtinge/cemiuiler/module/home/dock/FoldDeviceDock.kt index 7d04cf8205..4ac96fea23 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/home/dock/FoldDeviceDock.kt +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/home/dock/FoldDeviceDock.kt @@ -12,7 +12,7 @@ import de.robv.android.xposed.XC_MethodHook object FoldDeviceDock : BaseHook() { override fun init() { - //if (!mPrefsMap.getBoolean("home_fold_dock")) return + // if (!mPrefsMap.getBoolean("home_fold_dock")) return var hook1: XC_MethodHook.Unhook? = null var hook2: XC_MethodHook.Unhook? = null var hook3: XC_MethodHook.Unhook? = null @@ -44,7 +44,7 @@ object FoldDeviceDock : BaseHook() { }.createHook { before { hook2 = "com.miui.home.launcher.Application".hookBeforeMethod( - "isInFoldLargeScreen" + "isInFoldLargeScreen" ) { hookParam -> hookParam.result = true } @@ -86,4 +86,4 @@ object FoldDeviceDock : BaseHook() { it.result = false } } -} \ No newline at end of file +} diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/home/dock/FoldDock.java b/app/src/main/java/com/sevtinge/cemiuiler/module/home/dock/FoldDock.java index 004f7fde6f..044fc81242 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/home/dock/FoldDock.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/home/dock/FoldDock.java @@ -4,9 +4,7 @@ import com.sevtinge.cemiuiler.module.base.BaseHook; -import de.robv.android.xposed.XC_MethodHook; import de.robv.android.xposed.XC_MethodReplacement; -import de.robv.android.xposed.XposedHelpers; public class FoldDock extends BaseHook { @@ -28,29 +26,31 @@ public void init() { findAndHookMethod(mDeviceConfig, "getHotseatMaxCount", XC_MethodReplacement.returnConstant(5)); - findAndHookMethod("com.miui.home.launcher.hotseats.HotSeats", "initContent", new MethodHook() { + findAndHookMethod("com.miui.home.launcher.hotseats.HotSeats", "initContent", new MethodHook() { @Override protected void before(MethodHookParam param) throws Throwable { findAndHookMethod(mDeviceConfig, "isFoldDevice", - XC_MethodReplacement.returnConstant(true)); + XC_MethodReplacement.returnConstant(true)); } + @Override protected void after(MethodHookParam param) throws Throwable { findAndHookMethod(mDeviceConfig, "isFoldDevice", - XC_MethodReplacement.returnConstant(false)); + XC_MethodReplacement.returnConstant(false)); } }); findAndHookMethod("com.miui.home.launcher.hotseats.HotSeats", "updateContentView", new MethodHook() { @Override protected void before(MethodHookParam param) throws Throwable { findAndHookMethod(mApplication, "isInFoldLargeScreen", - XC_MethodReplacement.returnConstant(true)); + XC_MethodReplacement.returnConstant(true)); } + @Override protected void after(MethodHookParam param) throws Throwable { findAndHookMethod(mApplication, "isInFoldLargeScreen", - XC_MethodReplacement.returnConstant(false)); + XC_MethodReplacement.returnConstant(false)); } }); diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/home/dock/HideSeekPoint.kt b/app/src/main/java/com/sevtinge/cemiuiler/module/home/dock/HideSeekPoint.kt index bd42ff1bc7..732e3e65eb 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/home/dock/HideSeekPoint.kt +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/home/dock/HideSeekPoint.kt @@ -10,7 +10,7 @@ import com.sevtinge.cemiuiler.utils.hookAfterMethod object HideSeekPoint : BaseHook() { override fun init() { - //if (!mPrefsMap.getBoolean("home_hide_seek_point")) return + // if (!mPrefsMap.getBoolean("home_hide_seek_point")) return "com.miui.home.launcher.ScreenView".hookAfterMethod( "updateSeekPoints", Int::class.javaPrimitiveType ) { @@ -43,4 +43,4 @@ object HideSeekPoint : BaseHook() { } } -} \ No newline at end of file +} diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/home/drawer/AllAppsContainerViewBlur.kt b/app/src/main/java/com/sevtinge/cemiuiler/module/home/drawer/AllAppsContainerViewBlur.kt index c30c47327d..066e186abe 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/home/drawer/AllAppsContainerViewBlur.kt +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/home/drawer/AllAppsContainerViewBlur.kt @@ -13,8 +13,8 @@ import com.github.kyuubiran.ezxhelper.EzXHelper import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHooks import com.github.kyuubiran.ezxhelper.finders.MethodFinder.`-Static`.methodFinder import com.sevtinge.cemiuiler.module.base.BaseHook -import com.sevtinge.cemiuiler.utils.getObjectField import com.sevtinge.cemiuiler.utils.getCornerRadiusTop +import com.sevtinge.cemiuiler.utils.getObjectField import com.sevtinge.cemiuiler.utils.hookBeforeMethod import com.zhenxiang.blur.BlurFrameLayout import com.zhenxiang.blur.model.CornersRadius @@ -59,4 +59,4 @@ object AllAppsContainerViewBlur : BaseHook() { } } } -} \ No newline at end of file +} diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/home/drawer/AppDrawer.kt b/app/src/main/java/com/sevtinge/cemiuiler/module/home/drawer/AppDrawer.kt index 622af4a542..983995167f 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/home/drawer/AppDrawer.kt +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/home/drawer/AppDrawer.kt @@ -14,13 +14,15 @@ object AppDrawer : BaseHook() { override fun init() { if (mPrefsMap.getBoolean("home_drawer_all")) { try { - loadClass("com.miui.home.launcher.allapps.category.BaseAllAppsCategoryListContainer").methodFinder().first() { - name == "buildSortCategoryList" - } + loadClass("com.miui.home.launcher.allapps.category.BaseAllAppsCategoryListContainer").methodFinder() + .first() { + name == "buildSortCategoryList" + } } catch (e: Exception) { - loadClass("com.miui.home.launcher.allapps.category.AllAppsCategoryListContainer").methodFinder().first() { - name == "buildSortCategoryList" - } + loadClass("com.miui.home.launcher.allapps.category.AllAppsCategoryListContainer").methodFinder() + .first() { + name == "buildSortCategoryList" + } }.createHook { after { val list = it.result as ArrayList<*> @@ -34,7 +36,9 @@ object AppDrawer : BaseHook() { if (mPrefsMap.getBoolean("home_drawer_editor")) { "com.miui.home.launcher.allapps.AllAppsGridAdapter".hookAfterMethod( - "onBindViewHolder", "com.miui.home.launcher.allapps.AllAppsGridAdapter.ViewHolder".findClass(), Int::class.javaPrimitiveType + "onBindViewHolder", + "com.miui.home.launcher.allapps.AllAppsGridAdapter.ViewHolder".findClass(), + Int::class.javaPrimitiveType ) { if (it.args[0].callMethodAs("getItemViewType") == 64) { it.args[0].getObjectFieldAs("itemView").visibility = View.INVISIBLE @@ -43,4 +47,4 @@ object AppDrawer : BaseHook() { } } -} \ No newline at end of file +} diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/home/folder/FolderAnimation.kt b/app/src/main/java/com/sevtinge/cemiuiler/module/home/folder/FolderAnimation.kt index cad28e99c7..ce57bf877e 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/home/folder/FolderAnimation.kt +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/home/folder/FolderAnimation.kt @@ -41,8 +41,8 @@ class FolderAnimation : BaseHook() { before { hook1 = mSpringAnimator.methodFinder().first { name == "setDampingResponse" - && parameterTypes[0] == Float::class.javaPrimitiveType - && parameterTypes[1] == Float::class.javaPrimitiveType + && parameterTypes[0] == Float::class.javaPrimitiveType + && parameterTypes[1] == Float::class.javaPrimitiveType }.createHook { before { it.args[0] = value1 diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/home/folder/FolderBlur.kt b/app/src/main/java/com/sevtinge/cemiuiler/module/home/folder/FolderBlur.kt index 859c845877..6aed3eda5a 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/home/folder/FolderBlur.kt +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/home/folder/FolderBlur.kt @@ -13,7 +13,7 @@ import com.sevtinge.cemiuiler.utils.* object FolderBlur : BaseHook() { @SuppressLint("SuspiciousIndentation") override fun init() { - //修复文件夹背景模糊与始终模糊壁纸冲突 + // 修复文件夹背景模糊与始终模糊壁纸冲突 if (mPrefsMap.getBoolean("home_other_always_blur_launcher_wallpaper")) return Application::class.java.hookBeforeMethod("attach", Context::class.java) { it -> @@ -40,7 +40,8 @@ object FolderBlur : BaseHook() { val folderClingClass = findClassIfExists("com.miui.home.launcher.FolderCling") val folderInfo = findClassIfExists("com.miui.home.launcher.FolderInfo") val folderClass = findClassIfExists("com.miui.home.launcher.Folder") - val cancelShortcutMenuReasonClass = findClassIfExists("com.miui.home.launcher.shortcuts.CancelShortcutMenuReason") + val cancelShortcutMenuReasonClass = + findClassIfExists("com.miui.home.launcher.shortcuts.CancelShortcutMenuReason") launcherClass.hookAfterMethod("isFolderShowing") { isShouldBlur = it.result as Boolean @@ -50,7 +51,7 @@ object FolderBlur : BaseHook() { isFolderShowing = it.result as Boolean } - folderClass.hookAfterMethod("onOpen"){ + folderClass.hookAfterMethod("onOpen") { val mLauncher = it.thisObject as Activity blurUtilsClass.callStaticMethod( "fastBlur", @@ -81,7 +82,7 @@ object FolderBlur : BaseHook() { it.result = true } } else { - //copy from miui_xxl,修复文件夹内移动图标shortcut背景模糊丢失 + // copy from miui_xxl,修复文件夹内移动图标shortcut背景模糊丢失 launcherClass.hookAfterMethod("openFolder", folderInfo, View::class.java) { val mLauncher = it.thisObject as Activity diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/home/folder/FolderColumns.kt b/app/src/main/java/com/sevtinge/cemiuiler/module/home/folder/FolderColumns.kt index 79859f9d0b..50845e0474 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/home/folder/FolderColumns.kt +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/home/folder/FolderColumns.kt @@ -27,10 +27,13 @@ object FolderColumns : BaseHook() { if (columns > 3) { val mBackgroundView = XposedHelpers.getObjectField(it.thisObject, "mBackgroundView") as ViewGroup mBackgroundView.setPadding( - mBackgroundView.paddingLeft / 3, mBackgroundView.paddingTop, mBackgroundView.paddingRight / 3, mBackgroundView.paddingBottom + mBackgroundView.paddingLeft / 3, + mBackgroundView.paddingTop, + mBackgroundView.paddingRight / 3, + mBackgroundView.paddingBottom ) } } } -} \ No newline at end of file +} diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/home/folder/FolderShade.java b/app/src/main/java/com/sevtinge/cemiuiler/module/home/folder/FolderShade.java index 9ecf09d4fe..cb713c800b 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/home/folder/FolderShade.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/home/folder/FolderShade.java @@ -30,7 +30,7 @@ public void init() { MethodHook hook = new MethodHook() { @Override protected void after(MethodHookParam param) { - View folder = (View)param.thisObject; + View folder = (View) param.thisObject; new Thread(() -> { try { Context context = folder.getContext(); @@ -58,13 +58,13 @@ public Shader resize(int width, int height) { int bgcolor1 = (isLight ? 0x00ffffff : 0x00000000) | (Math.round(255 / 6f * level / 100f) * 0x1000000); int bgcolor2 = (isLight ? 0x00ffffff : 0x00000000) | (Math.round(255 * level / 100f) * 0x1000000); return new LinearGradient( - 0, - 0, - 0, - height, - new int[]{bgcolor1, bgcolor2, bgcolor2, bgcolor1}, - new float[]{0.0f, 0.25f, 0.65f, 1.0f}, - Shader.TileMode.CLAMP + 0, + 0, + 0, + height, + new int[]{bgcolor1, bgcolor2, bgcolor2, bgcolor1}, + new float[]{0.0f, 0.25f, 0.65f, 1.0f}, + Shader.TileMode.CLAMP ); } }); @@ -93,10 +93,10 @@ public Shader resize(int width, int height) { protected void after(MethodHookParam param) { int opt = mPrefsMap.getStringAsInt("home_folder_shade", 0); Object mLauncher = XposedHelpers.getObjectField(param.thisObject, "mLauncher"); - View folderCling = (View)XposedHelpers.callMethod(mLauncher, "getFolderCling"); + View folderCling = (View) XposedHelpers.callMethod(mLauncher, "getFolderCling"); if (opt == 1 || mLauncher == null || folderCling == null) return; Drawable bkg = folderCling.getBackground(); - if (bkg != null) bkg.setAlpha(Math.round((float)param.args[0] * 255)); + if (bkg != null) bkg.setAlpha(Math.round((float) param.args[0] * 255)); } }); } diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/home/layout/HotSeatsHeight.java b/app/src/main/java/com/sevtinge/cemiuiler/module/home/layout/HotSeatsHeight.java index 4f4a6a320b..ef322eaa6f 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/home/layout/HotSeatsHeight.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/home/layout/HotSeatsHeight.java @@ -14,7 +14,7 @@ public void init() { mDeviceConfig = findClassIfExists("com.miui.home.launcher.DeviceConfig"); - findAndHookMethod(mDeviceConfig,"calcHotSeatsHeight", Context.class, boolean.class, new MethodHook() { + findAndHookMethod(mDeviceConfig, "calcHotSeatsHeight", Context.class, boolean.class, new MethodHook() { @Override protected void before(MethodHookParam param) throws Throwable { Context context = (Context) param.args[0]; diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/home/layout/HotSeatsMarginBottom.java b/app/src/main/java/com/sevtinge/cemiuiler/module/home/layout/HotSeatsMarginBottom.java index 77cff0b325..43551c652f 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/home/layout/HotSeatsMarginBottom.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/home/layout/HotSeatsMarginBottom.java @@ -14,7 +14,7 @@ public void init() { mDeviceConfig = findClassIfExists("com.miui.home.launcher.DeviceConfig"); - findAndHookMethod(mDeviceConfig,"calcHotSeatsMarginBottom", Context.class, boolean.class, boolean.class, new MethodHook() { + findAndHookMethod(mDeviceConfig, "calcHotSeatsMarginBottom", Context.class, boolean.class, boolean.class, new MethodHook() { @Override protected void before(MethodHookParam param) throws Throwable { Context context = (Context) param.args[0]; diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/home/layout/UnlockGrids.java b/app/src/main/java/com/sevtinge/cemiuiler/module/home/layout/UnlockGrids.java index d932a6cdd0..291cebeb2c 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/home/layout/UnlockGrids.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/home/layout/UnlockGrids.java @@ -4,14 +4,14 @@ import android.os.Bundle; import com.sevtinge.cemiuiler.module.base.BaseHook; - import com.sevtinge.cemiuiler.utils.Helpers; + +import java.util.ArrayList; + import de.robv.android.xposed.XC_MethodHook; import de.robv.android.xposed.XC_MethodReplacement; import de.robv.android.xposed.XposedHelpers; -import java.util.ArrayList; - public class UnlockGrids extends BaseHook { Class mDeviceConfig; @@ -54,7 +54,7 @@ protected void after(MethodHookParam param) throws Throwable { XposedHelpers.callMethod(XposedHelpers.getObjectField(param.thisObject, "mScreenCellsConfig"), "setVisible", true); } }); - Class DeviceConfigClass = XposedHelpers.findClass("com.miui.home.launcher.DeviceConfig", lpparam.classLoader); + Class DeviceConfigClass = XposedHelpers.findClass("com.miui.home.launcher.DeviceConfig", lpparam.classLoader); Helpers.findAndHookMethod(DeviceConfigClass, "loadCellsCountConfig", Context.class, boolean.class, new MethodHook() { @Override protected void after(MethodHookParam param) throws Throwable { @@ -92,10 +92,12 @@ protected void before(MethodHookParam param) throws Throwable { Helpers.hookAllMethods("com.miui.home.launcher.DeviceConfig", lpparam.classLoader, "isCellSizeChangedByTheme", new MethodHook() { XC_MethodHook.Unhook nowordHook; + @Override protected void before(MethodHookParam param) throws Throwable { nowordHook = Helpers.findAndHookMethodUseUnhook("com.miui.home.launcher.common.Utilities", lpparam.classLoader, "isNoWordModel", XC_MethodReplacement.returnConstant(false)); } + @Override protected void after(MethodHookParam param) throws Throwable { if (nowordHook != null) nowordHook.unhook(); diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/home/other/AlwaysBlurWallpaper.kt b/app/src/main/java/com/sevtinge/cemiuiler/module/home/other/AlwaysBlurWallpaper.kt index 9d8f4cf883..5d92d6ee87 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/home/other/AlwaysBlurWallpaper.kt +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/home/other/AlwaysBlurWallpaper.kt @@ -8,7 +8,7 @@ import com.sevtinge.cemiuiler.module.base.BaseHook object AlwaysBlurWallpaper : BaseHook() { override fun init() { - //if (!mPrefsMap.getBoolean("home_blur_wallpaper")) return + // if (!mPrefsMap.getBoolean("home_blur_wallpaper")) return val value = mPrefsMap.getInt("home_blur_radius", 100) loadClass("com.miui.home.launcher.common.BlurUtils").methodFinder().first { diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/home/other/AlwaysShowStatusClock.kt b/app/src/main/java/com/sevtinge/cemiuiler/module/home/other/AlwaysShowStatusClock.kt index e0129b622e..4856a5474e 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/home/other/AlwaysShowStatusClock.kt +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/home/other/AlwaysShowStatusClock.kt @@ -8,7 +8,7 @@ import com.sevtinge.cemiuiler.module.base.BaseHook object AlwaysShowStatusClock : BaseHook() { override fun init() { - //if (!mPrefsMap.getBoolean("home_show_status_clock")) return + // if (!mPrefsMap.getBoolean("home_show_status_clock")) return val mWorkspaceClass = loadClass("com.miui.home.launcher.Workspace") try { mWorkspaceClass.methodFinder().first { diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/home/other/BlurWhenShowShortcutMenu.kt b/app/src/main/java/com/sevtinge/cemiuiler/module/home/other/BlurWhenShowShortcutMenu.kt index 00fa54779e..670fda4d89 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/home/other/BlurWhenShowShortcutMenu.kt +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/home/other/BlurWhenShowShortcutMenu.kt @@ -72,11 +72,11 @@ object BlurWhenShowShortcutMenu : BaseHook() { XposedHelpers.callMethod(mLauncher, "getSystemUiController") val mWindow = HookUtils.getValueByField(systemUiController, "mWindow") val targetBlurView = XposedHelpers.callMethod(mLauncher, "getScreen") as View - //修复文件夹内各种模糊冲突异常 + // 修复文件夹内各种模糊冲突异常 if (iconIsInFolder) { - - blurBackground = !mPrefsMap.getBoolean("home_folder_blur") - + + blurBackground = !mPrefsMap.getBoolean("home_folder_blur") + } else { blurBackground = true } @@ -93,7 +93,7 @@ object BlurWhenShowShortcutMenu : BaseHook() { valueAnimator.addUpdateListener { animator -> val value = animator.animatedValue as Int targetBlurView.setRenderEffect(renderEffectArray[value]) -//修复始终模糊壁纸冲突导致的各种模糊异常 +// 修复始终模糊壁纸冲突导致的各种模糊异常 if (blurBackground && !mPrefsMap.getBoolean("home_other_always_blur_launcher_wallpaper")) { XposedHelpers.callStaticMethod( blurUtilsClass, @@ -167,13 +167,13 @@ object BlurWhenShowShortcutMenu : BaseHook() { XposedHelpers.callMethod(mLauncher, "getSystemUiController") val mWindow = HookUtils.getValueByField(systemUiController, "mWindow") - if ( blurBackground ) { - XposedHelpers.callStaticMethod( - blurUtilsClass, - "fastBlurDirectly", - 0f, - mWindow - ) + if (blurBackground) { + XposedHelpers.callStaticMethod( + blurUtilsClass, + "fastBlurDirectly", + 0f, + mWindow + ) } } } @@ -209,8 +209,8 @@ object BlurWhenShowShortcutMenu : BaseHook() { valueAnimator.addUpdateListener { animator -> val value = animator.animatedValue as Int targetBlurView.setRenderEffect(renderEffectArray[value]) - //修复始终模糊壁纸模糊丢失 - if (blurBackground && !mPrefsMap.getBoolean("home_other_always_blur_launcher_wallpaper") ) { + // 修复始终模糊壁纸模糊丢失 + if (blurBackground && !mPrefsMap.getBoolean("home_other_always_blur_launcher_wallpaper")) { XposedHelpers.callStaticMethod( blurUtilsClass, "fastBlurDirectly", @@ -272,10 +272,10 @@ object BlurWhenShowShortcutMenu : BaseHook() { val mSystemShortcutMenu: ViewGroup val mSystemShortcutMenuBackground: GradientDrawable -/* - val mWidgetShortcutMenu: ViewGroup - val mWidgetShortcutMenuBackground: GradientDrawable -*/ + /* + val mWidgetShortcutMenu: ViewGroup + val mWidgetShortcutMenuBackground: GradientDrawable + */ val mAppPersonaliseShortcutMenu: ViewGroup val mAppPersonaliseShortcutMenuBackground: GradientDrawable @@ -317,7 +317,8 @@ object BlurWhenShowShortcutMenu : BaseHook() { XposedBridge.log("Cemiuiler: BlurWhenShowShortcutMenu get mSystemShortcutMenu failed by: $e") } try { - mAppPersonaliseShortcutMenu = param.thisObject.getObjectField("mAppPersonaliseShortcutMenu") as ViewGroup + mAppPersonaliseShortcutMenu = + param.thisObject.getObjectField("mAppPersonaliseShortcutMenu") as ViewGroup mAppPersonaliseShortcutMenuBackground = mAppPersonaliseShortcutMenu.background as GradientDrawable mAppPersonaliseShortcutMenuBackground.alpha = singleLayerAlpha @@ -350,23 +351,23 @@ object BlurWhenShowShortcutMenu : BaseHook() { } catch (e: Exception) { XposedBridge.log("Cemiuiler: BlurWhenShowShortcutMenu get mFolderShortcutMenu failed by: $e") } - /*try { - mWidgetShortcutMenu = param.thisObject.getObjectField("mWidgetShortcutMenu") as ViewGroup - mWidgetShortcutMenuBackground = - mWidgetShortcutMenu.background as GradientDrawable - mWidgetShortcutMenuBackground.alpha = singleLayerAlpha - for (index in 0..mWidgetShortcutMenu.childCount) { - val child = mWidgetShortcutMenu.getChildAt(index) - if (child != null && child.background != null) { - if (child.background is Drawable) { - val childBackground = child.background as Drawable - childBackground.alpha = singleLayerAlpha - } - } - } - } catch (e: Exception) { - XposedBridge.log("Cemiuiler: BlurWhenShowShortcutMenu get mWidgetShortcutMenu failed by: $e") - }*/ + /*try { + mWidgetShortcutMenu = param.thisObject.getObjectField("mWidgetShortcutMenu") as ViewGroup + mWidgetShortcutMenuBackground = + mWidgetShortcutMenu.background as GradientDrawable + mWidgetShortcutMenuBackground.alpha = singleLayerAlpha + for (index in 0..mWidgetShortcutMenu.childCount) { + val child = mWidgetShortcutMenu.getChildAt(index) + if (child != null && child.background != null) { + if (child.background is Drawable) { + val childBackground = child.background as Drawable + childBackground.alpha = singleLayerAlpha + } + } + } + } catch (e: Exception) { + XposedBridge.log("Cemiuiler: BlurWhenShowShortcutMenu get mWidgetShortcutMenu failed by: $e") + }*/ } }) XposedBridge.hookAllMethods( diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/home/other/DisableHideGoogle.kt b/app/src/main/java/com/sevtinge/cemiuiler/module/home/other/DisableHideGoogle.kt index 8e9a0d4f68..f83096ceb1 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/home/other/DisableHideGoogle.kt +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/home/other/DisableHideGoogle.kt @@ -24,11 +24,11 @@ object DisableHideGoogle : BaseHook() { skippedItem.removeIf { it.packageName == "com.google.android.googlequicksearchbox" - || it.packageName == "com.google.android.gms" + || it.packageName == "com.google.android.gms" } } } ) } -} \ No newline at end of file +} diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/home/other/FreeformShortcutMenu.java b/app/src/main/java/com/sevtinge/cemiuiler/module/home/other/FreeformShortcutMenu.java index 091b0f4ec1..cca396f582 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/home/other/FreeformShortcutMenu.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/home/other/FreeformShortcutMenu.java @@ -1,5 +1,7 @@ package com.sevtinge.cemiuiler.module.home.other; +import static de.robv.android.xposed.XposedHelpers.callMethod; + import android.annotation.SuppressLint; import android.app.Activity; import android.content.ComponentName; @@ -15,18 +17,12 @@ import com.sevtinge.cemiuiler.module.base.BaseHook; import com.sevtinge.cemiuiler.utils.Helpers; import com.sevtinge.cemiuiler.utils.LogUtils; -import com.sevtinge.cemiuiler.utils.Settings; import java.util.ArrayList; import java.util.List; import de.robv.android.xposed.XC_MethodHook; -import de.robv.android.xposed.XC_MethodReplacement; -import de.robv.android.xposed.XposedBridge; import de.robv.android.xposed.XposedHelpers; -import io.luckypray.dexkit.descriptor.member.DexMethodDescriptor; - -import static de.robv.android.xposed.XposedHelpers.callMethod; public class FreeformShortcutMenu extends BaseHook { diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/home/other/HomeMode.java b/app/src/main/java/com/sevtinge/cemiuiler/module/home/other/HomeMode.java index 0bb8ce1246..e8183a3d68 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/home/other/HomeMode.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/home/other/HomeMode.java @@ -14,7 +14,7 @@ public void init() { findAndHookMethod(mDeviceConfig, "isDarkMode", new MethodHook() { @Override protected void before(MethodHookParam param) throws Throwable { - int mHomeMode = mPrefsMap.getStringAsInt("home_other_home_mode",0); + int mHomeMode = mPrefsMap.getStringAsInt("home_other_home_mode", 0); boolean isHomeMode = !(mHomeMode == 2); param.setResult(isHomeMode); } diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/home/other/InfiniteScroll.java b/app/src/main/java/com/sevtinge/cemiuiler/module/home/other/InfiniteScroll.java index 8a73d355ab..672312bf58 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/home/other/InfiniteScroll.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/home/other/InfiniteScroll.java @@ -14,9 +14,9 @@ public void init() { protected void after(final MethodHookParam param) throws Throwable { if (param.args[0] != param.getResult()) return; int screenCount = (int) XposedHelpers.callMethod(param.thisObject, "getScreenCount"); - if ((int)param.args[2] == -1 && (int)param.args[0] == 0) + if ((int) param.args[2] == -1 && (int) param.args[0] == 0) param.setResult(screenCount); - else if ((int)param.args[2] == 1 && (int)param.args[0] == screenCount - 1) + else if ((int) param.args[2] == 1 && (int) param.args[0] == screenCount - 1) param.setResult(0); } }); @@ -27,7 +27,7 @@ protected void after(final MethodHookParam param) throws Throwable { int index = (int) param.getResult(); int mCurrentScreenIndex = XposedHelpers.getIntField(param.thisObject, lpparam.packageName.equals("com.miui.home") ? "mCurrentScreenIndex" : "mCurrentScreen"); if (mCurrentScreenIndex != index) return; - int screenCount = (int)XposedHelpers.callMethod(param.thisObject, "getScreenCount"); + int screenCount = (int) XposedHelpers.callMethod(param.thisObject, "getScreenCount"); if (index == 0) { param.setResult(screenCount); } else if (index == screenCount - 1) { diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/home/other/OverlapMode.kt b/app/src/main/java/com/sevtinge/cemiuiler/module/home/other/OverlapMode.kt index d0c3fb9838..2303b99f6c 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/home/other/OverlapMode.kt +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/home/other/OverlapMode.kt @@ -12,7 +12,7 @@ class OverlapMode : BaseHook() { .first { name == "inOverlapMode" }.createHook { - returnConstant(true) - } + returnConstant(true) + } } -} \ No newline at end of file +} diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/home/other/ShortcutBackgroundBlur.kt b/app/src/main/java/com/sevtinge/cemiuiler/module/home/other/ShortcutBackgroundBlur.kt index 686b91a001..ce57452281 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/home/other/ShortcutBackgroundBlur.kt +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/home/other/ShortcutBackgroundBlur.kt @@ -29,7 +29,7 @@ object ShortcutBackgroundBlur : BaseHook() { @RequiresApi(Build.VERSION_CODES.S) override fun init() { - //if (!mPrefsMap.getBoolean("home_shortcut_blur")) return + // if (!mPrefsMap.getBoolean("home_shortcut_blur")) return // From WINI with MIT val shortcutMenuBackgroundAlpha = mPrefsMap.getInt("home_other_shortcut_background_blur_custom", 200) @@ -362,4 +362,4 @@ object ShortcutBackgroundBlur : BaseHook() { } } -} \ No newline at end of file +} diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/home/recent/BlurLevel.kt b/app/src/main/java/com/sevtinge/cemiuiler/module/home/recent/BlurLevel.kt index 0af0178d44..3ec793e412 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/home/recent/BlurLevel.kt +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/home/recent/BlurLevel.kt @@ -32,6 +32,7 @@ object BlurLevel : BaseHook() { it.result = true } } + 5 -> { val blurClass = "com.miui.home.launcher.common.BlurUtils".findClass() val navStubViewClass = "com.miui.home.recents.NavStubView".findClass() @@ -54,6 +55,7 @@ object BlurLevel : BaseHook() { } } } + else -> { "com.miui.home.launcher.common.DeviceLevelUtils".hookBeforeMethod("isUseSimpleAnim") { it.result = false @@ -84,4 +86,4 @@ object BlurLevel : BaseHook() { } } -} \ No newline at end of file +} diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/home/recent/DisableRecentViewWallpaperDarken.kt b/app/src/main/java/com/sevtinge/cemiuiler/module/home/recent/DisableRecentViewWallpaperDarken.kt index 03c7c6959c..88846921f9 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/home/recent/DisableRecentViewWallpaperDarken.kt +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/home/recent/DisableRecentViewWallpaperDarken.kt @@ -9,7 +9,7 @@ import com.sevtinge.cemiuiler.utils.setObjectField object DisableRecentViewWallpaperDarken : BaseHook() { override fun init() { - //if (!mPrefsMap.getBoolean("home_disable_darken")) return + // if (!mPrefsMap.getBoolean("home_disable_darken")) return loadClass("com.miui.home.recents.DimLayer").methodFinder().first { name == "dim" && parameterCount == 3 }.createHook { @@ -19,4 +19,4 @@ object DisableRecentViewWallpaperDarken : BaseHook() { } } } -} \ No newline at end of file +} diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/home/recent/RealMemory.kt b/app/src/main/java/com/sevtinge/cemiuiler/module/home/recent/RealMemory.kt index cc8f60968e..fe6c20f6fb 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/home/recent/RealMemory.kt +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/home/recent/RealMemory.kt @@ -3,17 +3,17 @@ package com.sevtinge.cemiuiler.module.home.recent import android.annotation.SuppressLint import android.app.ActivityManager import android.content.Context -import android.widget.TextView -import com.sevtinge.cemiuiler.module.base.BaseHook -import com.sevtinge.cemiuiler.utils.getObjectField import android.text.format.Formatter +import android.widget.TextView import com.github.kyuubiran.ezxhelper.ClassUtils.loadClass import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHook import com.github.kyuubiran.ezxhelper.finders.ConstructorFinder.`-Static`.constructorFinder import com.github.kyuubiran.ezxhelper.finders.MethodFinder.`-Static`.methodFinder +import com.sevtinge.cemiuiler.module.base.BaseHook +import com.sevtinge.cemiuiler.utils.getObjectField @SuppressLint("StaticFieldLeak") -object RealMemory : BaseHook(){ +object RealMemory : BaseHook() { var context: Context? = null @SuppressLint("DiscouragedApi") @@ -62,4 +62,4 @@ object RealMemory : BaseHook(){ } } } -} \ No newline at end of file +} diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/home/recent/RecentResource.kt b/app/src/main/java/com/sevtinge/cemiuiler/module/home/recent/RecentResource.kt index 9321e302df..9b4768f7cd 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/home/recent/RecentResource.kt +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/home/recent/RecentResource.kt @@ -2,10 +2,10 @@ package com.sevtinge.cemiuiler.module.home.recent import android.app.Application import android.content.Context -import com.sevtinge.cemiuiler.module.base.BaseHook import android.content.res.Resources import com.github.kyuubiran.ezxhelper.EzXHelper import com.github.kyuubiran.ezxhelper.EzXHelper.appContext +import com.sevtinge.cemiuiler.module.base.BaseHook import com.sevtinge.cemiuiler.utils.ResourcesHookData import com.sevtinge.cemiuiler.utils.ResourcesHookMap import com.sevtinge.cemiuiler.utils.dp2px @@ -50,4 +50,4 @@ object RecentResource : BaseHook() { } } -} \ No newline at end of file +} diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/home/recent/RemoveCardAnim.kt b/app/src/main/java/com/sevtinge/cemiuiler/module/home/recent/RemoveCardAnim.kt index 8bfe4d8eef..1f00ac78fe 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/home/recent/RemoveCardAnim.kt +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/home/recent/RemoveCardAnim.kt @@ -27,8 +27,10 @@ object RemoveCardAnim : BaseHook() { "createScaleDismissAnimation", View::class.java, Float::class.java ) { val view = it.args[0] as View - val getScreenHeight = findClass("com.miui.home.launcher.DeviceConfig").callStaticMethod("getScreenHeight") as Int - val ofFloat = ObjectAnimator.ofFloat(view, View.TRANSLATION_Y, view.translationY, -getScreenHeight * 1.1484375f) + val getScreenHeight = + findClass("com.miui.home.launcher.DeviceConfig").callStaticMethod("getScreenHeight") as Int + val ofFloat = + ObjectAnimator.ofFloat(view, View.TRANSLATION_Y, view.translationY, -getScreenHeight * 1.1484375f) ofFloat.duration = 200 return@replaceMethod ofFloat } @@ -36,15 +38,20 @@ object RemoveCardAnim : BaseHook() { "com.miui.home.recents.views.VerticalSwipe".hookAfterMethod("calculate", Float::class.java) { val f = it.args[0] as Float val asScreenHeightWhenDismiss = - "com.miui.home.recents.views.VerticalSwipe".findClass().callStaticMethod("getAsScreenHeightWhenDismiss") as Int + "com.miui.home.recents.views.VerticalSwipe".findClass() + .callStaticMethod("getAsScreenHeightWhenDismiss") as Int val f2 = f / asScreenHeightWhenDismiss val mTaskViewHeight = it.thisObject.getObjectField("mTaskViewHeight") as Float val mCurScale = it.thisObject.getObjectField("mCurScale") as Float val f3: Float = mTaskViewHeight * mCurScale val i = if (f2 > 0.0f) 1 else if (f2 == 0.0f) 0 else -1 - val afterFrictionValue: Float = it.thisObject.callMethod("afterFrictionValue", f, asScreenHeightWhenDismiss) as Float - if (i < 0) it.thisObject.setObjectField("mCurTransY", (mTaskViewHeight / 2.0f + afterFrictionValue * 2) - (f3 / 2.0f)) + val afterFrictionValue: Float = + it.thisObject.callMethod("afterFrictionValue", f, asScreenHeightWhenDismiss) as Float + if (i < 0) it.thisObject.setObjectField( + "mCurTransY", + (mTaskViewHeight / 2.0f + afterFrictionValue * 2) - (f3 / 2.0f) + ) } } -} \ No newline at end of file +} diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/home/recent/TaskViewHorizontal.kt b/app/src/main/java/com/sevtinge/cemiuiler/module/home/recent/TaskViewHorizontal.kt index 2a18103276..b7da47e81c 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/home/recent/TaskViewHorizontal.kt +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/home/recent/TaskViewHorizontal.kt @@ -17,9 +17,11 @@ object TaskViewHorizontal : BaseHook() { "scaleTaskView", RectF::class.java, ) { "com.miui.home.recents.util.Utilities".findClass().callStaticMethod( - "scaleRectAboutCenter", it.args[0], if (it.thisObject.callMethod("isLandscapeVisually") as Boolean) value2 else value1 + "scaleRectAboutCenter", + it.args[0], + if (it.thisObject.callMethod("isLandscapeVisually") as Boolean) value2 else value1 ) } } -} \ No newline at end of file +} diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/home/recent/TaskViewVertical.kt b/app/src/main/java/com/sevtinge/cemiuiler/module/home/recent/TaskViewVertical.kt index 601396f671..89dce1e22a 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/home/recent/TaskViewVertical.kt +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/home/recent/TaskViewVertical.kt @@ -18,9 +18,10 @@ object TaskViewVertical : BaseHook() { "com.miui.home.recents.util.Utilities".findClass().callStaticMethod( "scaleRectAboutCenter", it.args[0], - value * "com.miui.home.recents.util.Utilities".findClass().callStaticMethod("getTaskViewScale", appContext) as Float + value * "com.miui.home.recents.util.Utilities".findClass() + .callStaticMethod("getTaskViewScale", appContext) as Float ) } } -} \ No newline at end of file +} diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/home/title/BigIconCorner.kt b/app/src/main/java/com/sevtinge/cemiuiler/module/home/title/BigIconCorner.kt index bacfe01f27..3560d87182 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/home/title/BigIconCorner.kt +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/home/title/BigIconCorner.kt @@ -9,9 +9,9 @@ import com.sevtinge.cemiuiler.utils.getObjectField object BigIconCorner : BaseHook() { override fun init() { - val maMlHostViewClass = loadClass( "com.miui.home.launcher.maml.MaMlHostView") + val maMlHostViewClass = loadClass("com.miui.home.launcher.maml.MaMlHostView") - //if (!mPrefsMap.getBoolean("big_icon_corner")) return + // if (!mPrefsMap.getBoolean("big_icon_corner")) return loadClass("com.miui.home.launcher.bigicon.BigIconUtil").methodFinder().filter { name == "getCroppedFromCorner" && parameterCount == 4 }.toList().createHooks { @@ -22,12 +22,12 @@ object BigIconCorner : BaseHook() { } maMlHostViewClass.methodFinder().first { - name == "getCornerRadius" - }.createHook { - before { - it.result = it.thisObject.getObjectField("mEnforcedCornerRadius") as Float - } - } + name == "getCornerRadius" + }.createHook { + before { + it.result = it.thisObject.getObjectField("mEnforcedCornerRadius") as Float + } + } maMlHostViewClass.methodFinder().first { name == "computeRoundedCornerRadius" && parameterCount == 1 @@ -45,4 +45,4 @@ object BigIconCorner : BaseHook() { } } } -} \ No newline at end of file +} diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/home/title/EnableIconMonetColor.kt b/app/src/main/java/com/sevtinge/cemiuiler/module/home/title/EnableIconMonetColor.kt index d36a70786b..68437b80f2 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/home/title/EnableIconMonetColor.kt +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/home/title/EnableIconMonetColor.kt @@ -13,10 +13,11 @@ object EnableIconMonetColor : BaseHook() { override fun init() {} @SuppressLint("DiscouragedApi") - fun initResource(resParam: XC_InitPackageResources.InitPackageResourcesParam){ + fun initResource(resParam: XC_InitPackageResources.InitPackageResourcesParam) { val monet = "system_accent1_100" val monoColorId = Resources.getSystem().getIdentifier(monet, "color", "android") - var monoColor = ContextCompat.getColor(context!!, monoColorId) /*原方法 Resources.getSystem().getColor(monoColorId)*/ + var monoColor = + ContextCompat.getColor(context!!, monoColorId) /*原方法 Resources.getSystem().getColor(monoColorId)*/ if (BaseXposedInit.mPrefsMap.getBoolean("home_other_use_edit_color")) { monoColor = mPrefsMap.getInt("home_other_your_color_qwq", -1) } @@ -35,4 +36,4 @@ object EnableIconMonetColor : BaseHook() { // "Monet" // ) } -} \ No newline at end of file +} diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/home/title/EnableIconMonoChrome.java b/app/src/main/java/com/sevtinge/cemiuiler/module/home/title/EnableIconMonoChrome.java index 0a6f0eec64..0399671540 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/home/title/EnableIconMonoChrome.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/home/title/EnableIconMonoChrome.java @@ -1,16 +1,15 @@ package com.sevtinge.cemiuiler.module.home.title; -import com.sevtinge.cemiuiler.XposedInit; import com.sevtinge.cemiuiler.module.base.BaseHook; public class EnableIconMonoChrome extends BaseHook { - @Override - public void init() { - findAndHookMethod("com.miui.home.launcher.graphics.MonochromeUtils", "isSupportMonochrome", new MethodHook() { - @Override - protected void before(MethodHookParam param) throws Throwable { - param.setResult(true); - } - }); - } + @Override + public void init() { + findAndHookMethod("com.miui.home.launcher.graphics.MonochromeUtils", "isSupportMonochrome", new MethodHook() { + @Override + protected void before(MethodHookParam param) throws Throwable { + param.setResult(true); + } + }); } +} diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/home/title/FixAnimation.java b/app/src/main/java/com/sevtinge/cemiuiler/module/home/title/FixAnimation.java index e8052640ff..a5fe1b7f08 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/home/title/FixAnimation.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/home/title/FixAnimation.java @@ -1,12 +1,13 @@ package com.sevtinge.cemiuiler.module.home.title; import android.view.MotionEvent; + import com.sevtinge.cemiuiler.module.base.BaseHook; -import de.robv.android.xposed.XposedBridge; + import de.robv.android.xposed.XposedHelpers; import kotlin.jvm.internal.Intrinsics; -//from MIUI-EXTRA by Art-Chen +// from MIUI-EXTRA by Art-Chen public class FixAnimation extends BaseHook { diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/home/title/IconScaleHook.java b/app/src/main/java/com/sevtinge/cemiuiler/module/home/title/IconScaleHook.java index 58840e6aef..5beb72a2ab 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/home/title/IconScaleHook.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/home/title/IconScaleHook.java @@ -21,7 +21,7 @@ public void init() { protected void after(final MethodHookParam param) throws Throwable { ViewGroup mIconContainer = (ViewGroup) XposedHelpers.getObjectField(param.thisObject, "mIconContainer"); if (mIconContainer == null || mIconContainer.getChildAt(0) == null) return; - float multx = (float)Math.sqrt(mPrefsMap.getInt("home_title_icon_scale", 100) / 100f); + float multx = (float) Math.sqrt(mPrefsMap.getInt("home_title_icon_scale", 100) / 100f); mIconContainer.getChildAt(0).setScaleX(multx); mIconContainer.getChildAt(0).setScaleY(multx); } @@ -30,9 +30,9 @@ protected void after(final MethodHookParam param) throws Throwable { Helpers.findAndHookMethod("com.miui.home.launcher.ItemIcon", lpparam.classLoader, "onFinishInflate", new MethodHook() { @Override protected void after(final MethodHookParam param) throws Throwable { - float multx = (float)Math.sqrt(mPrefsMap.getInt("home_title_icon_scale", 100) / 100f); + float multx = (float) Math.sqrt(mPrefsMap.getInt("home_title_icon_scale", 100) / 100f); - ViewGroup mIconContainer = (ViewGroup)XposedHelpers.getObjectField(param.thisObject, "mIconContainer"); + ViewGroup mIconContainer = (ViewGroup) XposedHelpers.getObjectField(param.thisObject, "mIconContainer"); if (mIconContainer != null && mIconContainer.getChildAt(0) != null) { mIconContainer.getChildAt(0).setScaleX(multx); mIconContainer.getChildAt(0).setScaleY(multx); @@ -41,14 +41,16 @@ protected void after(final MethodHookParam param) throws Throwable { } if (multx > 1) { - final TextView mMessage = (TextView)XposedHelpers.getObjectField(param.thisObject, "mMessage"); + final TextView mMessage = (TextView) XposedHelpers.getObjectField(param.thisObject, "mMessage"); if (mMessage != null) mMessage.addTextChangedListener(new TextWatcher() { @Override - public void beforeTextChanged(CharSequence s, int start, int count, int after) {} + public void beforeTextChanged(CharSequence s, int start, int count, int after) { + } @Override - public void onTextChanged(CharSequence s, int start, int before, int count) {} + public void onTextChanged(CharSequence s, int start, int before, int count) { + } @Override @SuppressLint("DiscouragedApi") @@ -64,16 +66,16 @@ public void afterTextChanged(Editable s) { XposedHelpers.setAdditionalInstanceField(param.thisObject, "mMessageAnimationOrig", XposedHelpers.getObjectField(param.thisObject, "mMessageAnimation")); XposedHelpers.setObjectField(param.thisObject, "mMessageAnimation", (Runnable) () -> { try { - Runnable mMessageAnimationOrig = (Runnable)XposedHelpers.getAdditionalInstanceField(param.thisObject, "mMessageAnimationOrig"); + Runnable mMessageAnimationOrig = (Runnable) XposedHelpers.getAdditionalInstanceField(param.thisObject, "mMessageAnimationOrig"); mMessageAnimationOrig.run(); boolean mIsShowMessageAnimation = XposedHelpers.getBooleanField(param.thisObject, "mIsShowMessageAnimation"); if (mIsShowMessageAnimation) { - View mMessage = (View)XposedHelpers.getObjectField(param.thisObject, "mMessage"); + View mMessage = (View) XposedHelpers.getObjectField(param.thisObject, "mMessage"); mMessage.animate().cancel(); mMessage.animate().scaleX(multx).scaleY(multx).setStartDelay(0).start(); } } catch (Throwable t) { - log(String.valueOf(t)); + log(String.valueOf(t)); } }); @@ -90,8 +92,8 @@ public void afterTextChanged(Editable s) { Helpers.findAndHookMethod("com.miui.home.launcher.ItemIcon", lpparam.classLoader, "getIconLocation", new MethodHook() { @Override protected void after(final MethodHookParam param) throws Throwable { - float multx = (float)Math.sqrt(mPrefsMap.getInt("home_title_icon_scale", 100) / 100f); - Rect rect = (Rect)param.getResult(); + float multx = (float) Math.sqrt(mPrefsMap.getInt("home_title_icon_scale", 100) / 100f); + Rect rect = (Rect) param.getResult(); if (rect == null) return; rect.right = rect.left + Math.round(rect.width() * multx); rect.bottom = rect.top + Math.round(rect.height() * multx); @@ -102,9 +104,9 @@ protected void after(final MethodHookParam param) throws Throwable { Helpers.findAndHookMethodSilently("com.miui.home.launcher.gadget.ClearButton", lpparam.classLoader, "onCreate", new MethodHook() { @Override protected void after(final MethodHookParam param) throws Throwable { - ViewGroup mIconContainer = (ViewGroup)XposedHelpers.getObjectField(param.thisObject, "mIconContainer"); + ViewGroup mIconContainer = (ViewGroup) XposedHelpers.getObjectField(param.thisObject, "mIconContainer"); if (mIconContainer == null || mIconContainer.getChildAt(0) == null) return; - float multi = (float)Math.sqrt(mPrefsMap.getInt("home_title_icon_scale", 100) / 100f); + float multi = (float) Math.sqrt(mPrefsMap.getInt("home_title_icon_scale", 100) / 100f); mIconContainer.getChildAt(0).setScaleX(multi); mIconContainer.getChildAt(0).setScaleY(multi); } diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/home/title/IconTitleColor.kt b/app/src/main/java/com/sevtinge/cemiuiler/module/home/title/IconTitleColor.kt index 24f3bca744..cce98ebe1e 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/home/title/IconTitleColor.kt +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/home/title/IconTitleColor.kt @@ -60,7 +60,11 @@ object IconTitleColor : BaseHook() { mTitle.setTextColor(value) } "com.miui.home.launcher.common.Utilities".hookAfterMethod( - "adaptTitleStyleToWallpaper", Context::class.java, TextView::class.java, Int::class.javaPrimitiveType, Int::class.javaPrimitiveType + "adaptTitleStyleToWallpaper", + Context::class.java, + TextView::class.java, + Int::class.javaPrimitiveType, + Int::class.javaPrimitiveType ) { val mTitle = it.args[1] as TextView if (mTitle.id == mTitle.resources.getIdentifier("icon_title", "id", "com.miui.home")) { @@ -72,4 +76,4 @@ object IconTitleColor : BaseHook() { } } -} \ No newline at end of file +} diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/home/title/LargeIconCornerRadius.java b/app/src/main/java/com/sevtinge/cemiuiler/module/home/title/LargeIconCornerRadius.java index 54553f324d..99a45d79cd 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/home/title/LargeIconCornerRadius.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/home/title/LargeIconCornerRadius.java @@ -24,15 +24,15 @@ public void init() { mBigIconUtil = findClassIfExists("com.miui.home.launcher.bigicon.BigIconUtil"); - hookAllMethods(mBigIconUtil, "getCroppedFromCorner", new MethodHook() { + hookAllMethods(mBigIconUtil, "getCroppedFromCorner", new MethodHook() { @Override protected void before(MethodHookParam param) throws Throwable { Context context = (Context) param.args[3]; Bitmap bitmap = (Bitmap) param.args[2]; Drawable drawable = new BitmapDrawable(context.getResources(), - croppedCorners(bitmap, - DisplayUtils.dp2px(context, - mPrefsMap.getInt("home_large_icon_corner_radius", 32)))); + croppedCorners(bitmap, + DisplayUtils.dp2px(context, + mPrefsMap.getInt("home_large_icon_corner_radius", 32)))); param.setResult(drawable); } }); diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/home/title/TitleFontSize.java b/app/src/main/java/com/sevtinge/cemiuiler/module/home/title/TitleFontSize.java index 69c8772898..1454414fdb 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/home/title/TitleFontSize.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/home/title/TitleFontSize.java @@ -14,7 +14,7 @@ public void init() { protected void after(MethodHookParam param) throws Throwable { TextView mTitle = (TextView) param.args[1]; if (mTitle != null && mTitle.getId() == mTitle.getResources().getIdentifier("icon_title", "id", "com.miui.home")) { - mTitle.setTextSize(TypedValue.COMPLEX_UNIT_SP, mPrefsMap.getInt("home_title_font_size",12)); + mTitle.setTextSize(TypedValue.COMPLEX_UNIT_SP, mPrefsMap.getInt("home_title_font_size", 12)); } } }); diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/home/title/TitleMarquee.java b/app/src/main/java/com/sevtinge/cemiuiler/module/home/title/TitleMarquee.java index 07812578a8..dc131e804a 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/home/title/TitleMarquee.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/home/title/TitleMarquee.java @@ -13,10 +13,10 @@ public class TitleMarquee extends BaseHook { public void init() { Class mItemIcon = findClassIfExists("com.miui.home.launcher.ItemIcon"); - findAndHookMethod(mItemIcon,"onFinishInflate", new MethodHook() { + findAndHookMethod(mItemIcon, "onFinishInflate", new MethodHook() { @Override protected void after(MethodHookParam param) throws Throwable { - TextView mTitle = (TextView) XposedHelpers.getObjectField(param.thisObject,"mTitle"); + TextView mTitle = (TextView) XposedHelpers.getObjectField(param.thisObject, "mTitle"); mTitle.setEllipsize(TextUtils.TruncateAt.MARQUEE); mTitle.setHorizontalFadingEdgeEnabled(true); diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/home/widget/AllWidgetAnimation.java b/app/src/main/java/com/sevtinge/cemiuiler/module/home/widget/AllWidgetAnimation.java index 1a1f71cb24..ab3c05b5d4 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/home/widget/AllWidgetAnimation.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/home/widget/AllWidgetAnimation.java @@ -1,6 +1,7 @@ package com.sevtinge.cemiuiler.module.home.widget; import com.sevtinge.cemiuiler.module.base.BaseHook; + import de.robv.android.xposed.XC_MethodHook; public class AllWidgetAnimation extends BaseHook { diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/home/widget/AllowMoveAllWidgetToMinus.kt b/app/src/main/java/com/sevtinge/cemiuiler/module/home/widget/AllowMoveAllWidgetToMinus.kt index 84e11e25bb..9b86bbd3a0 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/home/widget/AllowMoveAllWidgetToMinus.kt +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/home/widget/AllowMoveAllWidgetToMinus.kt @@ -11,7 +11,7 @@ import com.sevtinge.cemiuiler.utils.getObjectFieldOrNull object AllowMoveAllWidgetToMinus : BaseHook() { override fun init() { - //if (!mPrefsMap.getBoolean("home_widget_to_minus")) return + // if (!mPrefsMap.getBoolean("home_widget_to_minus")) return try { loadClass("com.miui.home.launcher.widget.MIUIWidgetHelper").methodFinder().first { name == "canDragToPa" && parameterCount == 2 diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/home/widget/AlwaysShowMiuiWidget.kt b/app/src/main/java/com/sevtinge/cemiuiler/module/home/widget/AlwaysShowMiuiWidget.kt index ebb26c4c0d..1875e43b84 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/home/widget/AlwaysShowMiuiWidget.kt +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/home/widget/AlwaysShowMiuiWidget.kt @@ -17,7 +17,7 @@ object AlwaysShowMiuiWidget : BaseHook() { } } catch (e: Exception) { loadClass("com.miui.home.launcher.widget.BaseWidgetsVerticalAdapter").methodFinder().first { - name == "buildAppWidgetsItems" + name == "buildAppWidgetsItems" } }.createHook { before { @@ -43,4 +43,4 @@ object AlwaysShowMiuiWidget : BaseHook() { } } } -} \ No newline at end of file +} diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/incallui/HideCrbt.java b/app/src/main/java/com/sevtinge/cemiuiler/module/incallui/HideCrbt.java index 214049906f..fab9c95273 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/incallui/HideCrbt.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/incallui/HideCrbt.java @@ -1,8 +1,6 @@ package com.sevtinge.cemiuiler.module.incallui; import com.sevtinge.cemiuiler.module.base.BaseHook; -import de.robv.android.xposed.*; -import de.robv.android.xposed.callbacks.XC_LoadPackage; public class HideCrbt extends BaseHook { Class loadClass; diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/joyose/DisableCloudControl.java b/app/src/main/java/com/sevtinge/cemiuiler/module/joyose/DisableCloudControl.java index 7b2ad28728..2691d5657e 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/joyose/DisableCloudControl.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/joyose/DisableCloudControl.java @@ -1,17 +1,18 @@ package com.sevtinge.cemiuiler.module.joyose; +import static com.sevtinge.cemiuiler.module.joyose.JoyoseDexKit.mJoyoseResultMethodsMap; + import com.sevtinge.cemiuiler.module.base.BaseHook; -import io.luckypray.dexkit.descriptor.member.DexMethodDescriptor; import java.lang.reflect.Method; import java.util.List; import java.util.Objects; -import static com.sevtinge.cemiuiler.module.joyose.JoyoseDexKit.mJoyoseResultMethodsMap; +import io.luckypray.dexkit.descriptor.member.DexMethodDescriptor; public class DisableCloudControl extends BaseHook { - //Class mCloud; + // Class mCloud; Method cloudControl; @@ -25,7 +26,7 @@ public void init() { hookMethod(cloudControl, new MethodHook() { @Override protected void before(MethodHookParam param) throws Throwable { - param.setResult(null);//2 + param.setResult(null);// 2 } }); } @@ -41,7 +42,7 @@ protected void before(MethodHookParam param) throws Throwable { } });*/ - //mCloud = findClassIfExists("com.xiaomi.joyose.cloud.g$a"); + // mCloud = findClassIfExists("com.xiaomi.joyose.cloud.g$a"); } } diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/joyose/EnableGpuTuner.java b/app/src/main/java/com/sevtinge/cemiuiler/module/joyose/EnableGpuTuner.java index cb7b363f7a..e1d8fa2808 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/joyose/EnableGpuTuner.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/joyose/EnableGpuTuner.java @@ -1,17 +1,18 @@ package com.sevtinge.cemiuiler.module.joyose; +import static com.sevtinge.cemiuiler.module.joyose.JoyoseDexKit.mJoyoseResultMethodsMap; + import com.sevtinge.cemiuiler.module.base.BaseHook; -import io.luckypray.dexkit.descriptor.member.DexMethodDescriptor; import java.lang.reflect.Method; import java.util.List; import java.util.Objects; -import static com.sevtinge.cemiuiler.module.joyose.JoyoseDexKit.mJoyoseResultMethodsMap; +import io.luckypray.dexkit.descriptor.member.DexMethodDescriptor; public class EnableGpuTuner extends BaseHook { - //Class mCloud; + // Class mCloud; Method gpuTuner; @@ -25,7 +26,7 @@ public void init() { hookMethod(gpuTuner, new MethodHook() { @Override protected void before(MethodHookParam param) throws Throwable { - param.setResult(true);//2 + param.setResult(true);// 2 } }); } @@ -41,7 +42,7 @@ protected void before(MethodHookParam param) throws Throwable { } });*/ - //mCloud = findClassIfExists("com.xiaomi.joyose.cloud.g$a"); + // mCloud = findClassIfExists("com.xiaomi.joyose.cloud.g$a"); } } diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/joyose/JoyoseDexKit.java b/app/src/main/java/com/sevtinge/cemiuiler/module/joyose/JoyoseDexKit.java index c842e29a9b..b4e9874a2e 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/joyose/JoyoseDexKit.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/joyose/JoyoseDexKit.java @@ -1,14 +1,15 @@ package com.sevtinge.cemiuiler.module.joyose; import com.sevtinge.cemiuiler.module.base.BaseHook; + +import java.util.List; +import java.util.Map; + import io.luckypray.dexkit.DexKitBridge; import io.luckypray.dexkit.builder.BatchFindArgs; import io.luckypray.dexkit.descriptor.member.DexMethodDescriptor; import io.luckypray.dexkit.enums.MatchType; -import java.util.List; -import java.util.Map; - public class JoyoseDexKit extends BaseHook { public static Map> mJoyoseResultMethodsMap; @@ -23,16 +24,16 @@ public void init() { return; } mJoyoseResultMethodsMap = - bridge.batchFindMethodsUsingStrings( - BatchFindArgs.builder() - .addQuery("CloudControl", List.of("job exist, sync local...")) - .addQuery("GpuTuner", List.of("GPUTUNER_SWITCH")) - .matchType(MatchType.CONTAINS) - .build() - ); + bridge.batchFindMethodsUsingStrings( + BatchFindArgs.builder() + .addQuery("CloudControl", List.of("job exist, sync local...")) + .addQuery("GpuTuner", List.of("GPUTUNER_SWITCH")) + .matchType(MatchType.CONTAINS) + .build() + ); } catch (Throwable e) { e.printStackTrace(); } bridge.close(); } -} \ No newline at end of file +} diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/lbe/DisableClipboardTip.kt b/app/src/main/java/com/sevtinge/cemiuiler/module/lbe/DisableClipboardTip.kt index ff5dbed7ce..4dde2fbda7 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/lbe/DisableClipboardTip.kt +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/lbe/DisableClipboardTip.kt @@ -9,7 +9,6 @@ import com.sevtinge.cemiuiler.R import com.sevtinge.cemiuiler.module.base.BaseHook import com.sevtinge.cemiuiler.utils.Helpers import de.robv.android.xposed.XC_MethodHook -import de.robv.android.xposed.XposedBridge import de.robv.android.xposed.XposedHelpers import de.robv.android.xposed.callbacks.XC_LoadPackage @@ -39,7 +38,7 @@ object DisableClipboardTip : BaseHook() { val permission: Long = XposedHelpers.callMethod(permissionRequest, "getPermission") as Long - //PermissionManager.PERM_ID_READ_CLIPBOARD + // PermissionManager.PERM_ID_READ_CLIPBOARD if (permission == 274877906944L) { val packageName = XposedHelpers.callMethod(permissionRequest, "getPackage") as String @@ -49,7 +48,11 @@ object DisableClipboardTip : BaseHook() { val modRes = Helpers.getModuleRes(context) if (!mDisableClipboardTip) { - Toast.makeText(context, "$appName ${modRes.getString(R.string.lbe_clipboard_tip)}", Toast.LENGTH_SHORT) + Toast.makeText( + context, + "$appName ${modRes.getString(R.string.lbe_clipboard_tip)}", + Toast.LENGTH_SHORT + ) .show() } hideDialog(lpparam, packageName, param) @@ -62,13 +65,13 @@ object DisableClipboardTip : BaseHook() { fun getAppName(context: Context, packageName: String): String { val pm: PackageManager = context.applicationContext.packageManager - val ai : ApplicationInfo = - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU){ - pm.getApplicationInfo(packageName, PackageManager.ApplicationInfoFlags.of(0)) - } else { - @Suppress("DEPRECATION") - pm.getApplicationInfo(packageName, 0) - } + val ai: ApplicationInfo = + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) { + pm.getApplicationInfo(packageName, PackageManager.ApplicationInfoFlags.of(0)) + } else { + @Suppress("DEPRECATION") + pm.getApplicationInfo(packageName, 0) + } return (pm.getApplicationLabel(ai)) as String } @@ -95,4 +98,4 @@ object DisableClipboardTip : BaseHook() { XposedHelpers.callMethod(param.thisObject, "gotChoice", 3, true, true) XposedHelpers.callMethod(param.thisObject, "onStop") } -} \ No newline at end of file +} diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/market/DeviceModify.java b/app/src/main/java/com/sevtinge/cemiuiler/module/market/DeviceModify.java index 107e8ae48d..ee51fec417 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/market/DeviceModify.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/market/DeviceModify.java @@ -14,39 +14,39 @@ public class DeviceModify extends BaseHook { @Override public void init() { - if (mPrefsMap.getStringAsInt("market_device_modify_new", 0) == 101) {//13u + if (mPrefsMap.getStringAsInt("market_device_modify_new", 0) == 101) {// 13u mDevice = "ishtar"; mModel = "2304FPN6DC"; mManufacturer = "Xiaomi"; - } else if (mPrefsMap.getStringAsInt("market_device_modify_new", 0) == 153) {//civi3 + } else if (mPrefsMap.getStringAsInt("market_device_modify_new", 0) == 153) {// civi3 mDevice = "yuechu"; mModel = "23046PNC9C"; mManufacturer = "Xiaomi"; - } else if (mPrefsMap.getStringAsInt("market_device_modify_new", 0) == 222) {//f2 + } else if (mPrefsMap.getStringAsInt("market_device_modify_new", 0) == 222) {// f2 mDevice = "zizhan"; mModel = "22061218C"; mManufacturer = "Xiaomi"; - } else if (mPrefsMap.getStringAsInt("market_device_modify_new", 0) == 223) {//f3 + } else if (mPrefsMap.getStringAsInt("market_device_modify_new", 0) == 223) {// f3 mDevice = "babylon"; mModel = "2308CPXD0C"; mManufacturer = "Xiaomi"; - } else if (mPrefsMap.getStringAsInt("market_device_modify_new", 0) == 190) {//alpha + } else if (mPrefsMap.getStringAsInt("market_device_modify_new", 0) == 190) {// alpha mDevice = "avenger"; mModel = "MIX Alpha"; mManufacturer = "Xiaomi"; - } else if (mPrefsMap.getStringAsInt("market_device_modify_new", 0) == 191) {//alpha + } else if (mPrefsMap.getStringAsInt("market_device_modify_new", 0) == 191) {// alpha mDevice = "draco"; mModel = "MIX Alpha"; mManufacturer = "Xiaomi"; - } else if (mPrefsMap.getStringAsInt("market_device_modify_new", 0) == 207) {//pad6p + } else if (mPrefsMap.getStringAsInt("market_device_modify_new", 0) == 207) {// pad6p mDevice = "liuqin"; mModel = "23046RP50C"; mManufacturer = "Xiaomi"; - } else if (mPrefsMap.getStringAsInt("market_device_modify_new", 0) == 306) {//k60p + } else if (mPrefsMap.getStringAsInt("market_device_modify_new", 0) == 306) {// k60p mDevice = "socrates"; mModel = "22127RK46C"; mManufacturer = "Redmi"; - } else if (mPrefsMap.getStringAsInt("market_device_modify_new", 0) == 332) {//n12t + } else if (mPrefsMap.getStringAsInt("market_device_modify_new", 0) == 332) {// n12t mDevice = "marble"; mModel = "23049RAD8C"; mManufacturer = "Redmi"; diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/market/MarketDexKit.java b/app/src/main/java/com/sevtinge/cemiuiler/module/market/MarketDexKit.java index f2c81e01aa..3ed1d2d713 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/market/MarketDexKit.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/market/MarketDexKit.java @@ -1,14 +1,15 @@ package com.sevtinge.cemiuiler.module.market; import com.sevtinge.cemiuiler.module.base.BaseHook; + +import java.util.List; +import java.util.Map; + import io.luckypray.dexkit.DexKitBridge; import io.luckypray.dexkit.builder.BatchFindArgs; import io.luckypray.dexkit.descriptor.member.DexMethodDescriptor; import io.luckypray.dexkit.enums.MatchType; -import java.util.List; -import java.util.Map; - public class MarketDexKit extends BaseHook { public static Map> mMarketResultMethodsMap; @@ -23,15 +24,15 @@ public void init() { return; } mMarketResultMethodsMap = - bridge.batchFindMethodsUsingStrings( - BatchFindArgs.builder() - .addQuery("DesktopSupportOperationIcon", List.of("com.miui.home", "supportOperationIcon", "AppGlobals.getContext()")) - .matchType(MatchType.CONTAINS) - .build() - ); - } catch (Throwable e) { + bridge.batchFindMethodsUsingStrings( + BatchFindArgs.builder() + .addQuery("DesktopSupportOperationIcon", List.of("com.miui.home", "supportOperationIcon", "AppGlobals.getContext()")) + .matchType(MatchType.CONTAINS) + .build() + ); + } catch (Throwable e) { e.printStackTrace(); } bridge.close(); } -} \ No newline at end of file +} diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/market/NewIcon.java b/app/src/main/java/com/sevtinge/cemiuiler/module/market/NewIcon.java index ddb02d2074..8899593235 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/market/NewIcon.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/market/NewIcon.java @@ -1,22 +1,20 @@ package com.sevtinge.cemiuiler.module.market; +import static com.sevtinge.cemiuiler.module.market.MarketDexKit.mMarketResultMethodsMap; + import com.sevtinge.cemiuiler.module.base.BaseHook; -import de.robv.android.xposed.XC_MethodReplacement; -import de.robv.android.xposed.XposedBridge; -import io.luckypray.dexkit.DexKitBridge; -import io.luckypray.dexkit.builder.BatchFindArgs; -import io.luckypray.dexkit.descriptor.member.DexMethodDescriptor; -import io.luckypray.dexkit.enums.MatchType; import java.lang.reflect.Method; import java.util.List; -import java.util.Map; import java.util.Objects; -import static com.sevtinge.cemiuiler.module.market.MarketDexKit.mMarketResultMethodsMap; +import de.robv.android.xposed.XC_MethodReplacement; +import de.robv.android.xposed.XposedBridge; +import io.luckypray.dexkit.descriptor.member.DexMethodDescriptor; public class NewIcon extends BaseHook { static Method isDesktopSupportOperationIcon; + @Override public void init() { try { diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/mediaeditor/MediaEditorDexKit.java b/app/src/main/java/com/sevtinge/cemiuiler/module/mediaeditor/MediaEditorDexKit.java index c51518872c..b8bdcda0a5 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/mediaeditor/MediaEditorDexKit.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/mediaeditor/MediaEditorDexKit.java @@ -24,12 +24,12 @@ public void init() { return; } mMediaEditorResultMethodsMap = - bridge.batchFindMethodsUsingStrings( - BatchFindArgs.builder() - .addQuery("FilterManager", List.of("wayne")) - .matchType(MatchType.FULL) - .build() - ); + bridge.batchFindMethodsUsingStrings( + BatchFindArgs.builder() + .addQuery("FilterManager", List.of("wayne")) + .matchType(MatchType.FULL) + .build() + ); } catch (Throwable e) { e.printStackTrace(); } diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/mediaeditor/UnlockMinimumCropLimit.java b/app/src/main/java/com/sevtinge/cemiuiler/module/mediaeditor/UnlockMinimumCropLimit.java index ef8bc34f06..1a038bee72 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/mediaeditor/UnlockMinimumCropLimit.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/mediaeditor/UnlockMinimumCropLimit.java @@ -1,18 +1,10 @@ package com.sevtinge.cemiuiler.module.mediaeditor; -import android.annotation.SuppressLint; -import android.content.Context; -import android.content.pm.PackageInfo; -import android.content.pm.PackageManager; -import com.sevtinge.cemiuiler.module.base.BaseHook; -import de.robv.android.xposed.XC_MethodReplacement; -import de.robv.android.xposed.XposedBridge; -import de.robv.android.xposed.XposedHelpers; -import de.robv.android.xposed.callbacks.XC_LoadPackage; +import static com.sevtinge.cemiuiler.utils.Helpers.getPackageVersionName; -import java.io.File; +import com.sevtinge.cemiuiler.module.base.BaseHook; -import static com.sevtinge.cemiuiler.utils.Helpers.getPackageVersionName; +import de.robv.android.xposed.XC_MethodReplacement; public class UnlockMinimumCropLimit extends BaseHook { @@ -36,8 +28,8 @@ public void init() { log("hook com.miui.mediaeditor Use abc 1"); } catch (Exception e) { try { - //mScreenCropView = findClassIfExists("com.miui.gallery.editor.photo.screen.crop.ScreenCropView$h"); - //returnIntConstant(mScreenCropView, "e"); + // mScreenCropView = findClassIfExists("com.miui.gallery.editor.photo.screen.crop.ScreenCropView$h"); + // returnIntConstant(mScreenCropView, "e"); mCrop = findClassIfExists("com.miui.gallery.editor.photo.core.imports.obsoletes.Crop$o"); returnIntConstant(mCrop, "a"); log("hook com.miui.mediaeditor Use abc 2"); diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/milink/UnlockMiShare.java b/app/src/main/java/com/sevtinge/cemiuiler/module/milink/UnlockMiShare.java index b91298879d..5fc4e22789 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/milink/UnlockMiShare.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/milink/UnlockMiShare.java @@ -1,6 +1,7 @@ package com.sevtinge.cemiuiler.module.milink; import com.sevtinge.cemiuiler.module.base.BaseHook; + import de.robv.android.xposed.XC_MethodHook; public class UnlockMiShare extends BaseHook { diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/mirror/UnlockMiuiPlus.java b/app/src/main/java/com/sevtinge/cemiuiler/module/mirror/UnlockMiuiPlus.java index 28cd2fb69f..884d1f52f3 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/mirror/UnlockMiuiPlus.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/mirror/UnlockMiuiPlus.java @@ -1,7 +1,9 @@ package com.sevtinge.cemiuiler.module.mirror; import android.content.Context; + import com.sevtinge.cemiuiler.module.base.BaseHook; + import de.robv.android.xposed.XC_MethodHook; public class UnlockMiuiPlus extends BaseHook { diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/misettings/CustomRefreshRate.java b/app/src/main/java/com/sevtinge/cemiuiler/module/misettings/CustomRefreshRate.java index 0820b67d73..93a4cd28d6 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/misettings/CustomRefreshRate.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/misettings/CustomRefreshRate.java @@ -1,6 +1,7 @@ package com.sevtinge.cemiuiler.module.misettings; import android.os.Bundle; + import com.sevtinge.cemiuiler.module.base.BaseHook; import de.robv.android.xposed.XposedHelpers; diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/mishare/DisableMishareAutoOff.java b/app/src/main/java/com/sevtinge/cemiuiler/module/mishare/DisableMishareAutoOff.java index c1379e9ba7..bfd4434e55 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/mishare/DisableMishareAutoOff.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/mishare/DisableMishareAutoOff.java @@ -1,19 +1,16 @@ package com.sevtinge.cemiuiler.module.mishare; +import static com.sevtinge.cemiuiler.module.mishare.MiShareDexKit.mMiShareResultMethodsMap; + import com.sevtinge.cemiuiler.module.base.BaseHook; -import de.robv.android.xposed.XC_MethodReplacement; -import de.robv.android.xposed.XposedBridge; -import io.luckypray.dexkit.DexKitBridge; -import io.luckypray.dexkit.builder.BatchFindArgs; -import io.luckypray.dexkit.descriptor.member.DexMethodDescriptor; -import io.luckypray.dexkit.enums.MatchType; import java.lang.reflect.Method; import java.util.List; -import java.util.Map; import java.util.Objects; -import static com.sevtinge.cemiuiler.module.mishare.MiShareDexKit.mMiShareResultMethodsMap; +import de.robv.android.xposed.XC_MethodReplacement; +import de.robv.android.xposed.XposedBridge; +import io.luckypray.dexkit.descriptor.member.DexMethodDescriptor; public class DisableMishareAutoOff extends BaseHook { diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/mishare/MiShareDexKit.java b/app/src/main/java/com/sevtinge/cemiuiler/module/mishare/MiShareDexKit.java index 69e1247f59..6b2135224e 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/mishare/MiShareDexKit.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/mishare/MiShareDexKit.java @@ -1,14 +1,15 @@ package com.sevtinge.cemiuiler.module.mishare; import com.sevtinge.cemiuiler.module.base.BaseHook; + +import java.util.List; +import java.util.Map; + import io.luckypray.dexkit.DexKitBridge; import io.luckypray.dexkit.builder.BatchFindArgs; import io.luckypray.dexkit.descriptor.member.DexMethodDescriptor; import io.luckypray.dexkit.enums.MatchType; -import java.util.List; -import java.util.Map; - public class MiShareDexKit extends BaseHook { public static Map> mMiShareResultMethodsMap; @@ -23,15 +24,15 @@ public void init() { return; } mMiShareResultMethodsMap = - bridge.batchFindMethodsUsingStrings( - BatchFindArgs.builder() - .addQuery("MiShareAutoOff", List.of("MiShareService", "EnabledState")) - .addQuery("qwq", List.of("EnabledState", "mishare_enabled")) - .addQuery("qwq2", List.of("null context", "cta_agree")) - .matchType(MatchType.CONTAINS) - .build() - ); - } catch (Throwable e) { + bridge.batchFindMethodsUsingStrings( + BatchFindArgs.builder() + .addQuery("MiShareAutoOff", List.of("MiShareService", "EnabledState")) + .addQuery("qwq", List.of("EnabledState", "mishare_enabled")) + .addQuery("qwq2", List.of("null context", "cta_agree")) + .matchType(MatchType.CONTAINS) + .build() + ); + } catch (Throwable e) { e.printStackTrace(); } bridge.close(); diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/miwallpaper/UnlockSuperWallpaper.java b/app/src/main/java/com/sevtinge/cemiuiler/module/miwallpaper/UnlockSuperWallpaper.java index f0f158140c..8e6432ebfd 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/miwallpaper/UnlockSuperWallpaper.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/miwallpaper/UnlockSuperWallpaper.java @@ -1,7 +1,9 @@ package com.sevtinge.cemiuiler.module.miwallpaper; import android.content.Context; + import com.sevtinge.cemiuiler.module.base.BaseHook; + import de.robv.android.xposed.XposedHelpers; public class UnlockSuperWallpaper extends BaseHook { diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/mms/DisableAd.java b/app/src/main/java/com/sevtinge/cemiuiler/module/mms/DisableAd.java index 02eb8afc19..ffd4a9bc19 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/mms/DisableAd.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/mms/DisableAd.java @@ -1,18 +1,15 @@ package com.sevtinge.cemiuiler.module.mms; +import static com.sevtinge.cemiuiler.module.mms.MmsDexKit.mMmsResultClassMap; + import android.content.Context; + import com.sevtinge.cemiuiler.module.base.BaseHook; -import de.robv.android.xposed.XC_MethodReplacement; -import de.robv.android.xposed.XposedBridge; -import de.robv.android.xposed.XposedHelpers; -import io.luckypray.dexkit.descriptor.member.DexClassDescriptor; -import io.luckypray.dexkit.descriptor.member.DexMethodDescriptor; -import java.lang.reflect.Method; import java.util.List; import java.util.Objects; -import static com.sevtinge.cemiuiler.module.mms.MmsDexKit.mMmsResultClassMap; +import io.luckypray.dexkit.descriptor.member.DexClassDescriptor; public class DisableAd extends BaseHook { @Override @@ -21,7 +18,7 @@ public void init() { List result = Objects.requireNonNull(mMmsResultClassMap.get("DisableAd")); for (DexClassDescriptor descriptor : result) { Class enableAds = descriptor.getClassInstance(lpparam.classLoader); - log("EnableAds class is "+ enableAds); + log("EnableAds class is " + enableAds); findAndHookMethod(enableAds, "j", new MethodHook() { @Override protected void before(MethodHookParam param) throws Throwable { diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/mms/MmsDexKit.java b/app/src/main/java/com/sevtinge/cemiuiler/module/mms/MmsDexKit.java index 5b35895550..ac19326aeb 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/mms/MmsDexKit.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/mms/MmsDexKit.java @@ -1,15 +1,15 @@ package com.sevtinge.cemiuiler.module.mms; import com.sevtinge.cemiuiler.module.base.BaseHook; + +import java.util.List; +import java.util.Map; + import io.luckypray.dexkit.DexKitBridge; import io.luckypray.dexkit.builder.BatchFindArgs; import io.luckypray.dexkit.descriptor.member.DexClassDescriptor; -import io.luckypray.dexkit.descriptor.member.DexMethodDescriptor; import io.luckypray.dexkit.enums.MatchType; -import java.util.List; -import java.util.Map; - public class MmsDexKit extends BaseHook { public static Map> mMmsResultClassMap; @@ -24,12 +24,12 @@ public void init() { return; } mMmsResultClassMap = - bridge.batchFindClassesUsingStrings( - BatchFindArgs.builder() - .addQuery("DisableAd", List.of("Unknown type of the message: ")) - .matchType(MatchType.CONTAINS) - .build() - ); + bridge.batchFindClassesUsingStrings( + BatchFindArgs.builder() + .addQuery("DisableAd", List.of("Unknown type of the message: ")) + .matchType(MatchType.CONTAINS) + .build() + ); } catch (Throwable e) { e.printStackTrace(); } diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/music/DisableAd.java b/app/src/main/java/com/sevtinge/cemiuiler/module/music/DisableAd.java index 68ddfd1fca..f2bd8b6750 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/music/DisableAd.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/music/DisableAd.java @@ -1,15 +1,13 @@ package com.sevtinge.cemiuiler.module.music; import com.sevtinge.cemiuiler.module.base.BaseHook; -import de.robv.android.xposed.XposedBridge; -import de.robv.android.xposed.callbacks.XC_LoadPackage; public class DisableAd extends BaseHook { Class mCloud; @Override - //by @Yife Playte + // by @Yife Playte public void init() { try { findAndHookMethod("com.tencent.qqmusiclite.activity.SplashAdActivity", "onCreate", android.os.Bundle.class, new MethodHook() { diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/packageinstaller/DisableAD.java b/app/src/main/java/com/sevtinge/cemiuiler/module/packageinstaller/DisableAD.java index 638da91d3f..6858d50463 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/packageinstaller/DisableAD.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/packageinstaller/DisableAD.java @@ -1,20 +1,16 @@ package com.sevtinge.cemiuiler.module.packageinstaller; -import com.sevtinge.cemiuiler.module.base.BaseHook; +import static com.sevtinge.cemiuiler.module.packageinstaller.PackageInstallerDexKit.mPackageInstallerResultMethodsMap; -import de.robv.android.xposed.XC_MethodReplacement; -import de.robv.android.xposed.XposedBridge; -import io.luckypray.dexkit.DexKitBridge; -import io.luckypray.dexkit.builder.BatchFindArgs; -import io.luckypray.dexkit.descriptor.member.DexMethodDescriptor; -import io.luckypray.dexkit.enums.MatchType; +import com.sevtinge.cemiuiler.module.base.BaseHook; import java.lang.reflect.Method; import java.util.List; -import java.util.Map; import java.util.Objects; -import static com.sevtinge.cemiuiler.module.packageinstaller.PackageInstallerDexKit.mPackageInstallerResultMethodsMap; +import de.robv.android.xposed.XC_MethodReplacement; +import de.robv.android.xposed.XposedBridge; +import io.luckypray.dexkit.descriptor.member.DexMethodDescriptor; public class DisableAD extends BaseHook { @@ -24,7 +20,7 @@ public void init() { List result = Objects.requireNonNull(mPackageInstallerResultMethodsMap.get("EnableAds")); for (DexMethodDescriptor descriptor : result) { Method enableAds = descriptor.getMethodInstance(lpparam.classLoader); - log("enableAds method is "+ enableAds); + log("enableAds method is " + enableAds); if (enableAds.getReturnType() == boolean.class) { XposedBridge.hookMethod(enableAds, XC_MethodReplacement.returnConstant(false)); } @@ -37,7 +33,7 @@ public void init() { List result = Objects.requireNonNull(mPackageInstallerResultMethodsMap.get("AppStoreRecommend")); for (DexMethodDescriptor descriptor : result) { Method appStoreRecommend = descriptor.getMethodInstance(lpparam.classLoader); - log("appStoreRecommend method is "+ appStoreRecommend); + log("appStoreRecommend method is " + appStoreRecommend); if (appStoreRecommend.getReturnType() == boolean.class) { XposedBridge.hookMethod(appStoreRecommend, XC_MethodReplacement.returnConstant(false)); } @@ -50,7 +46,7 @@ public void init() { List result = Objects.requireNonNull(mPackageInstallerResultMethodsMap.get("InstallerOpenSafetyModel")); for (DexMethodDescriptor descriptor : result) { Method installerOpenSafetyModel = descriptor.getMethodInstance(lpparam.classLoader); - log("installerOpenSafetyModel method is "+ installerOpenSafetyModel); + log("installerOpenSafetyModel method is " + installerOpenSafetyModel); if (installerOpenSafetyModel.getReturnType() == boolean.class) { XposedBridge.hookMethod(installerOpenSafetyModel, XC_MethodReplacement.returnConstant(false)); } diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/packageinstaller/DisableCountChecking.java b/app/src/main/java/com/sevtinge/cemiuiler/module/packageinstaller/DisableCountChecking.java index b23337c20f..d7850a4492 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/packageinstaller/DisableCountChecking.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/packageinstaller/DisableCountChecking.java @@ -1,6 +1,7 @@ package com.sevtinge.cemiuiler.module.packageinstaller; import com.sevtinge.cemiuiler.module.base.BaseHook; + import de.robv.android.xposed.XC_MethodReplacement; public class DisableCountChecking extends BaseHook { diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/packageinstaller/DisplayMoreApkInfo.java b/app/src/main/java/com/sevtinge/cemiuiler/module/packageinstaller/DisplayMoreApkInfo.java index b577637a47..3ca19b7ea6 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/packageinstaller/DisplayMoreApkInfo.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/packageinstaller/DisplayMoreApkInfo.java @@ -42,7 +42,7 @@ public void init() { Field[] fields = mAppInfoViewObject.getDeclaredFields(); String apkInfoFieldName = null; - for (Field field: fields) + for (Field field : fields) if (mApkInfo.isAssignableFrom(field.getType())) { apkInfoFieldName = field.getName(); break; @@ -77,14 +77,14 @@ protected void after(MethodHookParam param) throws Throwable { linearLayout.setLayoutParams(new LinearLayout.LayoutParams(-1, -1)); LinearLayout.LayoutParams AppNameViewParams = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT); - AppNameViewParams.setMargins(0, DisplayUtils.dip2px(mRootView.getContext(), 10),0,0); + AppNameViewParams.setMargins(0, DisplayUtils.dip2px(mRootView.getContext(), 10), 0, 0); mAppNameView.setLayoutParams(AppNameViewParams); mAppNameView.setGravity(Gravity.CENTER); LinearLayout linearLayout2 = new LinearLayout(mRootView.getContext()); linearLayout2.setOrientation(LinearLayout.VERTICAL); linearLayout2.setGravity(Gravity.CENTER); - linearLayout2.setPadding(0, DisplayUtils.dip2px(mRootView.getContext(), 10),0,0); + linearLayout2.setPadding(0, DisplayUtils.dip2px(mRootView.getContext(), 10), 0, 0); linearLayout2.setLayoutParams(new LinearLayout.LayoutParams(-1, -1)); TextView mAppVersionNameView = new TextView(mRootView.getContext()); @@ -107,7 +107,7 @@ protected void after(MethodHookParam param) throws Throwable { String mAppVersionCode; String mAppSdk; if (mAppInfo != null) { - mAppVersionName = (String)XposedHelpers.callMethod(apkInfo, "getInstalledVersionName") + " ➟ " + mPkgInfo.versionName; + mAppVersionName = (String) XposedHelpers.callMethod(apkInfo, "getInstalledVersionName") + " ➟ " + mPkgInfo.versionName; mAppVersionCode = XposedHelpers.callMethod(apkInfo, "getInstalledVersionCode") + " ➟ " + mPkgInfo.getLongVersionCode(); mAppSdk = mAppInfo.minSdkVersion + "-" + mAppInfo.targetSdkVersion + " ➟ " + mPkgInfo.applicationInfo.minSdkVersion + "-" + mPkgInfo.applicationInfo.targetSdkVersion; } else { diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/packageinstaller/DisplayMoreApkInfoNew.kt b/app/src/main/java/com/sevtinge/cemiuiler/module/packageinstaller/DisplayMoreApkInfoNew.kt index 04933136c4..4f2e303fb1 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/packageinstaller/DisplayMoreApkInfoNew.kt +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/packageinstaller/DisplayMoreApkInfoNew.kt @@ -32,7 +32,7 @@ object DisplayMoreApkInfoNew : BaseHook() { @SuppressLint("SetTextI18n") override fun init() { - //if (!getBoolean("packageinstaller_show_more_apk_info", false)) return + // if (!getBoolean("packageinstaller_show_more_apk_info", false)) return mApkInfo = findClassIfExists("com.miui.packageInstaller.model.ApkInfo")//.findClassOrNull() mAppInfoViewObject = findClassIfExists("com.miui.packageInstaller.ui.listcomponets.AppInfoViewObject")//.findClassOrNull() @@ -86,7 +86,7 @@ object DisplayMoreApkInfoNew : BaseHook() { mAppNameView.layoutParams = appNameViewParams mAppNameView.gravity = Gravity.CENTER val linearLayout2 = LinearLayout(mContainerView.context) - //val linearLayout2 = LinearLayout(mContext) + // val linearLayout2 = LinearLayout(mContext) linearLayout2.orientation = LinearLayout.VERTICAL linearLayout2.gravity = Gravity.CENTER linearLayout2.setPadding( @@ -102,7 +102,10 @@ object DisplayMoreApkInfoNew : BaseHook() { it.setMargins(0, dp2px(mContext, 13f), 0, 0) } linearLayout2.background = - modRes.getDrawable(if (isDarkMode) R.drawable.ic_packageinstaller_background_dark else R.drawable.ic_packageinstaller_background_light, modRes.newTheme()) + modRes.getDrawable( + if (isDarkMode) R.drawable.ic_packageinstaller_background_dark else R.drawable.ic_packageinstaller_background_light, + modRes.newTheme() + ) val mAppPackageNameView = TextView(mContext) mContainerView.removeAllViews() val mAppVersionNameView = TextView(mContainerView.context) @@ -142,10 +145,13 @@ object DisplayMoreApkInfoNew : BaseHook() { mAppSdk = mPkgInfo.applicationInfo.minSdkVersion.toString() + "-" + mPkgInfo.applicationInfo.targetSdkVersion } - mAppVersionNameView.text = modRes.getString(R.string.various_install_app_info_version_name) + ": " + mAppVersionName - mAppVersionCodeView.text = modRes.getString(R.string.various_install_app_info_version_code) + ": " + mAppVersionCode + mAppVersionNameView.text = + modRes.getString(R.string.various_install_app_info_version_name) + ": " + mAppVersionName + mAppVersionCodeView.text = + modRes.getString(R.string.various_install_app_info_version_code) + ": " + mAppVersionCode mAppSdkView.text = modRes.getString(R.string.various_install_app_info_sdk) + ": " + mAppSdk - mAppSizeView.text = modRes.getString(R.string.various_install_app_size) + ": " + mOldAppSize + mNewAppSize + mAppSizeView.text = + modRes.getString(R.string.various_install_app_size) + ": " + mOldAppSize + mNewAppSize mAppPackageNameView.text = mPackageName linearLayout2.addView(mAppVersionNameView, 0) linearLayout2.addView(mAppVersionCodeView, 1) diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/packageinstaller/InstallRiskDisable.java b/app/src/main/java/com/sevtinge/cemiuiler/module/packageinstaller/InstallRiskDisable.java index cdfbd89fea..c6e9adc4ef 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/packageinstaller/InstallRiskDisable.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/packageinstaller/InstallRiskDisable.java @@ -1,22 +1,18 @@ package com.sevtinge.cemiuiler.module.packageinstaller; +import static com.sevtinge.cemiuiler.module.packageinstaller.PackageInstallerDexKit.mPackageInstallerResultMethodsMap; + import android.content.Context; import com.sevtinge.cemiuiler.module.base.BaseHook; -import de.robv.android.xposed.XC_MethodReplacement; -import de.robv.android.xposed.XposedBridge; -import io.luckypray.dexkit.DexKitBridge; -import io.luckypray.dexkit.builder.BatchFindArgs; -import io.luckypray.dexkit.descriptor.member.DexMethodDescriptor; -import io.luckypray.dexkit.enums.MatchType; - import java.lang.reflect.Method; import java.util.List; -import java.util.Map; import java.util.Objects; -import static com.sevtinge.cemiuiler.module.packageinstaller.PackageInstallerDexKit.mPackageInstallerResultMethodsMap; +import de.robv.android.xposed.XC_MethodReplacement; +import de.robv.android.xposed.XposedBridge; +import io.luckypray.dexkit.descriptor.member.DexMethodDescriptor; public class InstallRiskDisable extends BaseHook { @@ -27,7 +23,7 @@ public void init() { List result = Objects.requireNonNull(mPackageInstallerResultMethodsMap.get("SecureVerifyEnable")); for (DexMethodDescriptor descriptor : result) { Method secureVerifyEnable = descriptor.getMethodInstance(lpparam.classLoader); - log("secureVerifyEnable method is "+ secureVerifyEnable); + log("secureVerifyEnable method is " + secureVerifyEnable); if (secureVerifyEnable.getReturnType() == boolean.class) { XposedBridge.hookMethod(secureVerifyEnable, XC_MethodReplacement.returnConstant(false)); } @@ -37,12 +33,12 @@ public void init() { } findAndHookMethod("com.android.packageinstaller.compat.MiuiSettingsCompat", - "isInstallRiskEnabled", - Context.class, - XC_MethodReplacement.returnConstant(false)); + "isInstallRiskEnabled", + Context.class, + XC_MethodReplacement.returnConstant(false)); findAndHookMethod("com.android.packageinstaller.compat.MiuiSettingsCompat", - "isPersonalizedAdEnabled", - XC_MethodReplacement.returnConstant(false)); + "isPersonalizedAdEnabled", + XC_MethodReplacement.returnConstant(false)); } } diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/packageinstaller/InstallSource.java b/app/src/main/java/com/sevtinge/cemiuiler/module/packageinstaller/InstallSource.java index bbb75a65a4..96b06cb50f 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/packageinstaller/InstallSource.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/packageinstaller/InstallSource.java @@ -14,7 +14,7 @@ public void init() { mInstallSourcePackageName = mPrefsMap.getString("miui_package_installer_install_source", "com.android.fileexplorer"); findAndHookMethodSilently("com.miui.packageInstaller.InstallStart", - "getCallingPackage", - XC_MethodReplacement.returnConstant(mInstallSourcePackageName)); + "getCallingPackage", + XC_MethodReplacement.returnConstant(mInstallSourcePackageName)); } } diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/packageinstaller/MiuiPackageInstallModify.java b/app/src/main/java/com/sevtinge/cemiuiler/module/packageinstaller/MiuiPackageInstallModify.java index f33f313aa3..04654d4021 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/packageinstaller/MiuiPackageInstallModify.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/packageinstaller/MiuiPackageInstallModify.java @@ -28,8 +28,8 @@ protected void after(MethodHookParam param) throws Throwable { }); // 隐藏开启纯净模式提示 - //SafeModeTipViewObject safeModeTipViewObject = new SafeModeTipViewObject(h10, pureModeElderTipViewObject.f5884m, null, null, 12, null); - //safeModeTipViewObject.a(); a方法里的调用 + // SafeModeTipViewObject safeModeTipViewObject = new SafeModeTipViewObject(h10, pureModeElderTipViewObject.f5884m, null, null, 12, null); + // safeModeTipViewObject.a(); a方法里的调用 findAndHookMethod("com.miui.packageInstaller.ui.listcomponets.g0", "a", new MethodHook() { @Override protected void after(MethodHookParam param) throws Throwable { diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/packageinstaller/PackageInstallerDexKit.java b/app/src/main/java/com/sevtinge/cemiuiler/module/packageinstaller/PackageInstallerDexKit.java index 08100ffe56..63c0895068 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/packageinstaller/PackageInstallerDexKit.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/packageinstaller/PackageInstallerDexKit.java @@ -1,14 +1,15 @@ package com.sevtinge.cemiuiler.module.packageinstaller; import com.sevtinge.cemiuiler.module.base.BaseHook; + +import java.util.List; +import java.util.Map; + import io.luckypray.dexkit.DexKitBridge; import io.luckypray.dexkit.builder.BatchFindArgs; import io.luckypray.dexkit.descriptor.member.DexMethodDescriptor; import io.luckypray.dexkit.enums.MatchType; -import java.util.List; -import java.util.Map; - public class PackageInstallerDexKit extends BaseHook { public static Map> mPackageInstallerResultMethodsMap; @@ -23,16 +24,16 @@ public void init() { return; } mPackageInstallerResultMethodsMap = - bridge.batchFindMethodsUsingStrings( - BatchFindArgs.builder() - .addQuery("SecureVerifyEnable", List.of("secure_verify_enable")) - .addQuery("DisableSecurityModeFlag", List.of("user_close_security_mode_flag")) - .addQuery("InstallerOpenSafetyModel", List.of("installerOpenSafetyModel")) - .addQuery("AppStoreRecommend", List.of("app_store_recommend")) - .addQuery("EnableAds", List.of("ads_enable")) - .matchType(MatchType.CONTAINS) - .build() - ); + bridge.batchFindMethodsUsingStrings( + BatchFindArgs.builder() + .addQuery("SecureVerifyEnable", List.of("secure_verify_enable")) + .addQuery("DisableSecurityModeFlag", List.of("user_close_security_mode_flag")) + .addQuery("InstallerOpenSafetyModel", List.of("installerOpenSafetyModel")) + .addQuery("AppStoreRecommend", List.of("app_store_recommend")) + .addQuery("EnableAds", List.of("ads_enable")) + .matchType(MatchType.CONTAINS) + .build() + ); } catch (Throwable e) { e.printStackTrace(); } diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/packageinstaller/SafeMode.java b/app/src/main/java/com/sevtinge/cemiuiler/module/packageinstaller/SafeMode.java index a7d7965c84..4f55360ec5 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/packageinstaller/SafeMode.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/packageinstaller/SafeMode.java @@ -12,8 +12,8 @@ public class SafeMode extends BaseHook { public void init() { findAndHookMethod("com.android.packageinstaller.compat.MiuiSettingsCompat", - "isSafeModelEnable", - Context.class, - XC_MethodReplacement.returnConstant(mPrefsMap.getBoolean("miui_package_installer_safe_mode"))); + "isSafeModelEnable", + Context.class, + XC_MethodReplacement.returnConstant(mPrefsMap.getBoolean("miui_package_installer_safe_mode"))); } } diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/packageinstaller/UpdateSystemApp.java b/app/src/main/java/com/sevtinge/cemiuiler/module/packageinstaller/UpdateSystemApp.java index ce4242a21a..8d1f7ff076 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/packageinstaller/UpdateSystemApp.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/packageinstaller/UpdateSystemApp.java @@ -1,6 +1,7 @@ package com.sevtinge.cemiuiler.module.packageinstaller; import android.content.pm.ApplicationInfo; + import com.sevtinge.cemiuiler.module.base.BaseHook; import java.lang.reflect.Method; @@ -30,17 +31,17 @@ protected void before(MethodHookParam param) throws Throwable { if (length >= 15 && length <= 25) { List methods = List.of(mClz.getDeclaredMethods()); for (Method method : methods) { - try{ - if (method.getParameterTypes()[0] == ApplicationInfo.class) { - hookMethod(method, new MethodHook() { - @Override - protected void before(MethodHookParam param) throws Throwable { - param.setResult(false); - } - }); - break; - - } + try { + if (method.getParameterTypes()[0] == ApplicationInfo.class) { + hookMethod(method, new MethodHook() { + @Override + protected void before(MethodHookParam param) throws Throwable { + param.setResult(false); + } + }); + break; + + } } catch (Throwable e) { e.printStackTrace(); } diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/personalassistant/BlurPersonalAssistant.kt b/app/src/main/java/com/sevtinge/cemiuiler/module/personalassistant/BlurPersonalAssistant.kt index 18bac92e71..a7b81d7026 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/personalassistant/BlurPersonalAssistant.kt +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/personalassistant/BlurPersonalAssistant.kt @@ -11,8 +11,8 @@ import de.robv.android.xposed.XposedHelpers import kotlin.math.abs object BlurPersonalAssistant : BaseHook() { - val blurRadius = mPrefsMap.getInt("personal_assistant_blurradius",80) - val backgroundColor = mPrefsMap.getInt("personal_assistant_color",-1) + val blurRadius = mPrefsMap.getInt("personal_assistant_blurradius", 80) + val backgroundColor = mPrefsMap.getInt("personal_assistant_color", -1) override fun init() { val AssistantOverlayWindowClass = findClassIfExists( @@ -49,4 +49,4 @@ object BlurPersonalAssistant : BaseHook() { } }) } -} \ No newline at end of file +} diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/personalassistant/EnableFoldWidget.java b/app/src/main/java/com/sevtinge/cemiuiler/module/personalassistant/EnableFoldWidget.java index 28738fb517..70527bb2d7 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/personalassistant/EnableFoldWidget.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/personalassistant/EnableFoldWidget.java @@ -4,7 +4,6 @@ import com.sevtinge.cemiuiler.module.base.BaseHook; -import de.robv.android.xposed.XC_MethodReplacement; import de.robv.android.xposed.XposedHelpers; public class EnableFoldWidget extends BaseHook { @@ -25,7 +24,7 @@ public void init() { findAndHookMethod(c, "a", Context.class, String.class, new MethodHook() { @Override protected void before(MethodHookParam param) throws Throwable { - XposedHelpers.setStaticObjectField(m2,"a", "fold"); + XposedHelpers.setStaticObjectField(m2, "a", "fold"); } }); diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/personalassistant/PadWidgetEnable.java b/app/src/main/java/com/sevtinge/cemiuiler/module/personalassistant/PadWidgetEnable.java index d704288a73..36d88ceca2 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/personalassistant/PadWidgetEnable.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/personalassistant/PadWidgetEnable.java @@ -16,11 +16,11 @@ public enum DeviceType { @Override public void init() { - hookAllMethods(m2,"c", new MethodHook() { + hookAllMethods(m2, "c", new MethodHook() { @Override protected void before(MethodHookParam param) throws Throwable { - XposedHelpers.callMethod(XposedHelpers.findClassIfExists("miui.os.Build",lpparam.classLoader),"isTablet", true); - XposedHelpers.setStaticBooleanField(XposedHelpers.findClassIfExists("miui.os.Build", lpparam.classLoader),"IS_TABLET", true); + XposedHelpers.callMethod(XposedHelpers.findClassIfExists("miui.os.Build", lpparam.classLoader), "isTablet", true); + XposedHelpers.setStaticBooleanField(XposedHelpers.findClassIfExists("miui.os.Build", lpparam.classLoader), "IS_TABLET", true); } }); diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/personalassistant/WidgetCrack.kt b/app/src/main/java/com/sevtinge/cemiuiler/module/personalassistant/WidgetCrack.kt index 10340b89e8..590b74cb7c 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/personalassistant/WidgetCrack.kt +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/personalassistant/WidgetCrack.kt @@ -15,7 +15,7 @@ class WidgetCrack : BaseHook() { } } - loadClass("com.miui.personalassistant.picker.business.detail.PickerDetailViewModel").methodFinder().first{ + loadClass("com.miui.personalassistant.picker.business.detail.PickerDetailViewModel").methodFinder().first { name == "isCanDirectAddMaMl" }.createHook { after { @@ -23,13 +23,14 @@ class WidgetCrack : BaseHook() { } } - loadClass("com.miui.personalassistant.picker.business.detail.utils.PickerDetailDownloadManager\$Companion").methodFinder().first { - name == "isCanDownload" - }.createHook { - before { - it.result = true + loadClass("com.miui.personalassistant.picker.business.detail.utils.PickerDetailDownloadManager\$Companion").methodFinder() + .first { + name == "isCanDownload" + }.createHook { + before { + it.result = true + } } - } loadClass("com.miui.personalassistant.picker.business.detail.utils.PickerDetailUtil").methodFinder().first { name == "isCanAutoDownloadMaMl" @@ -55,21 +56,23 @@ class WidgetCrack : BaseHook() { } } - loadClass("com.miui.personalassistant.picker.business.detail.bean.PickerDetailResponseWrapper").methodFinder().first { - name == "isPay" - }.createHook { - before { - it.result = false + loadClass("com.miui.personalassistant.picker.business.detail.bean.PickerDetailResponseWrapper").methodFinder() + .first { + name == "isPay" + }.createHook { + before { + it.result = false + } } - } - loadClass("com.miui.personalassistant.picker.business.detail.bean.PickerDetailResponseWrapper").methodFinder().first { - name == "isBought" - }.createHook { - before { - it.result = true + loadClass("com.miui.personalassistant.picker.business.detail.bean.PickerDetailResponseWrapper").methodFinder() + .first { + name == "isBought" + }.createHook { + before { + it.result = true + } } - } loadClass("com.miui.personalassistant.picker.business.detail.PickerDetailViewModel").methodFinder().first { name == "shouldCheckMamlBoughtState" diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/scanner/EnableCard.java b/app/src/main/java/com/sevtinge/cemiuiler/module/scanner/EnableCard.java index c61926c6a3..44fafbef52 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/scanner/EnableCard.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/scanner/EnableCard.java @@ -3,22 +3,22 @@ import com.sevtinge.cemiuiler.module.base.BaseHook; public class EnableCard extends BaseHook { - @Override - public void init() { - hookAllMethods("com.xiaomi.scanner.settings.FeatureManager", "isAddBusinessCard", new MethodHook() { - @Override - protected void before(MethodHookParam param) throws Throwable { - param.setResult(true); - } - }); - hookAllMethods("com.xiaomi.scanner.settings.FeatureManager", "isBusinessCardModuleAvailable", new MethodHook() { - @Override - protected void before(MethodHookParam param) throws Throwable { - param.setResult(true); - } - }); - } + @Override + public void init() { + hookAllMethods("com.xiaomi.scanner.settings.FeatureManager", "isAddBusinessCard", new MethodHook() { + @Override + protected void before(MethodHookParam param) throws Throwable { + param.setResult(true); + } + }); + hookAllMethods("com.xiaomi.scanner.settings.FeatureManager", "isBusinessCardModuleAvailable", new MethodHook() { + @Override + protected void before(MethodHookParam param) throws Throwable { + param.setResult(true); + } + }); } +} diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/scanner/EnableDocPpt.java b/app/src/main/java/com/sevtinge/cemiuiler/module/scanner/EnableDocPpt.java index 0ce04add95..5601506d70 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/scanner/EnableDocPpt.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/scanner/EnableDocPpt.java @@ -3,14 +3,14 @@ import com.sevtinge.cemiuiler.module.base.BaseHook; public class EnableDocPpt extends BaseHook { - @Override - public void init() { - hookAllMethods("com.xiaomi.scanner.settings.FeatureManager", "isPPTModuleAvailable", new MethodHook() { - @Override - protected void before(MethodHookParam param) throws Throwable { - param.setResult(true); - } - }); - } + @Override + public void init() { + hookAllMethods("com.xiaomi.scanner.settings.FeatureManager", "isPPTModuleAvailable", new MethodHook() { + @Override + protected void before(MethodHookParam param) throws Throwable { + param.setResult(true); + } + }); } +} diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/scanner/EnableOcr.java b/app/src/main/java/com/sevtinge/cemiuiler/module/scanner/EnableOcr.java index 1732c0732f..08b4c0a6b5 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/scanner/EnableOcr.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/scanner/EnableOcr.java @@ -3,16 +3,16 @@ import com.sevtinge.cemiuiler.module.base.BaseHook; public class EnableOcr extends BaseHook { - @Override - public void init() { - hookAllMethods("com.xiaomi.scanner.settings.FeatureManager", "isAddTextExtractionFunction", new MethodHook() { - @Override - protected void before(MethodHookParam param) throws Throwable { - param.setResult(true); - } - }); - } + @Override + public void init() { + hookAllMethods("com.xiaomi.scanner.settings.FeatureManager", "isAddTextExtractionFunction", new MethodHook() { + @Override + protected void before(MethodHookParam param) throws Throwable { + param.setResult(true); + } + }); } +} diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/scanner/EnableTranslation.java b/app/src/main/java/com/sevtinge/cemiuiler/module/scanner/EnableTranslation.java index 72b140ea34..2e25229cd8 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/scanner/EnableTranslation.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/scanner/EnableTranslation.java @@ -3,22 +3,22 @@ import com.sevtinge.cemiuiler.module.base.BaseHook; public class EnableTranslation extends BaseHook { - @Override - public void init() { - hookAllMethods("com.xiaomi.scanner.settings.FeatureManager", "isAddTranslation", new MethodHook() { - @Override - protected void before(MethodHookParam param) throws Throwable { - param.setResult(true); - } - }); - hookAllMethods("com.xiaomi.scanner.settings.FeatureManager", "isTranslationModuleAvailable", new MethodHook() { - @Override - protected void before(MethodHookParam param) throws Throwable { - param.setResult(true); - } - }); - } + @Override + public void init() { + hookAllMethods("com.xiaomi.scanner.settings.FeatureManager", "isAddTranslation", new MethodHook() { + @Override + protected void before(MethodHookParam param) throws Throwable { + param.setResult(true); + } + }); + hookAllMethods("com.xiaomi.scanner.settings.FeatureManager", "isTranslationModuleAvailable", new MethodHook() { + @Override + protected void before(MethodHookParam param) throws Throwable { + param.setResult(true); + } + }); } +} diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/scanner/document/EnableDocument.java b/app/src/main/java/com/sevtinge/cemiuiler/module/scanner/document/EnableDocument.java index c737cd6879..bbe1069712 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/scanner/document/EnableDocument.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/scanner/document/EnableDocument.java @@ -3,16 +3,16 @@ import com.sevtinge.cemiuiler.module.base.BaseHook; public class EnableDocument extends BaseHook { - @Override - public void init() { - hookAllMethods("com.xiaomi.scanner.settings.FeatureManager", "isAddDocumentModule", new MethodHook() { - @Override - protected void before(MethodHookParam param) throws Throwable { - param.setResult(true); - } - }); - } + @Override + public void init() { + hookAllMethods("com.xiaomi.scanner.settings.FeatureManager", "isAddDocumentModule", new MethodHook() { + @Override + protected void before(MethodHookParam param) throws Throwable { + param.setResult(true); + } + }); } +} diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/scanner/document/EnableExcel.java b/app/src/main/java/com/sevtinge/cemiuiler/module/scanner/document/EnableExcel.java index 08c0128ec9..e580fcae3f 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/scanner/document/EnableExcel.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/scanner/document/EnableExcel.java @@ -3,27 +3,27 @@ import com.sevtinge.cemiuiler.module.base.BaseHook; public class EnableExcel extends BaseHook { - @Override - public void init() { - hookAllMethods("com.xiaomi.scanner.util.SPUtils", "getFormModule", new MethodHook() { - @Override - protected void before(MethodHookParam param) throws Throwable { - param.setResult(true); - } - }); - hookAllMethods("com.xiaomi.scanner.settings.FeatureManager", "isSupportForm", new MethodHook() { - @Override - protected void before(MethodHookParam param) throws Throwable { - param.setResult(true); - } - }); - hookAllMethods("com.xiaomi.scanner.settings.FeatureManager", "isAddFormRecognitionFunction", new MethodHook() { - @Override - protected void before(MethodHookParam param) throws Throwable { - param.setResult(true); - } - }); - } + @Override + public void init() { + hookAllMethods("com.xiaomi.scanner.util.SPUtils", "getFormModule", new MethodHook() { + @Override + protected void before(MethodHookParam param) throws Throwable { + param.setResult(true); + } + }); + hookAllMethods("com.xiaomi.scanner.settings.FeatureManager", "isSupportForm", new MethodHook() { + @Override + protected void before(MethodHookParam param) throws Throwable { + param.setResult(true); + } + }); + hookAllMethods("com.xiaomi.scanner.settings.FeatureManager", "isAddFormRecognitionFunction", new MethodHook() { + @Override + protected void before(MethodHookParam param) throws Throwable { + param.setResult(true); + } + }); } +} diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/screenrecorder/ForceSupportPlaybackCapture.kt b/app/src/main/java/com/sevtinge/cemiuiler/module/screenrecorder/ForceSupportPlaybackCapture.kt index 5b449338bb..9ae1ba56f5 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/screenrecorder/ForceSupportPlaybackCapture.kt +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/screenrecorder/ForceSupportPlaybackCapture.kt @@ -1,12 +1,12 @@ package com.sevtinge.cemiuiler.module.screenrecorder +import com.sevtinge.cemiuiler.module.base.BaseHook import de.robv.android.xposed.XC_MethodHook import de.robv.android.xposed.XposedHelpers -import com.sevtinge.cemiuiler.module.base.BaseHook class ForceSupportPlaybackCapture : BaseHook() { override fun init() { - //if (!xPrefs.getBoolean("force_support_playbackcapture", true)) return + // if (!xPrefs.getBoolean("force_support_playbackcapture", true)) return XposedHelpers.findAndHookMethod("android.os.SystemProperties", lpparam.classLoader, @@ -20,4 +20,4 @@ class ForceSupportPlaybackCapture : BaseHook() { } }) } -} \ No newline at end of file +} diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/screenrecorder/ScreenRecorderConfig.kt b/app/src/main/java/com/sevtinge/cemiuiler/module/screenrecorder/ScreenRecorderConfig.kt index 568617276a..a88e32e5f6 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/screenrecorder/ScreenRecorderConfig.kt +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/screenrecorder/ScreenRecorderConfig.kt @@ -13,7 +13,7 @@ object ScreenRecorderConfig : BaseHook() { val mScreenRecorderConfigADescriptor = mScreenRecorderConfigA.first() val mScreenRecorderConfigAMethod: Method = mScreenRecorderConfigADescriptor.getMethodInstance(lpparam.classLoader) - //XposedBridge.log("Cemiuiler: DeviceModify (Updater) dexkit method is $systemPropertiesMethod") + // XposedBridge.log("Cemiuiler: DeviceModify (Updater) dexkit method is $systemPropertiesMethod") mScreenRecorderConfigAMethod.createHook { before { param -> param.args[0] = 1200 @@ -23,11 +23,11 @@ object ScreenRecorderConfig : BaseHook() { it.isAccessible = true }.let { fieldAccessible -> fieldAccessible.isFinal && - fieldAccessible.get(null).let { - kotlin.runCatching { - (it as IntArray).contentEquals(intArrayOf(15, 24, 30, 48, 60, 90)) - }.getOrDefault(false) - } + fieldAccessible.get(null).let { + kotlin.runCatching { + (it as IntArray).contentEquals(intArrayOf(15, 24, 30, 48, 60, 90)) + }.getOrDefault(false) + } } }?.set(null, intArrayOf(15, 24, 30, 48, 60, 90, 120, 144)) } @@ -39,7 +39,7 @@ object ScreenRecorderConfig : BaseHook() { val mScreenRecorderConfigBDescriptor = mScreenRecorderConfigB.first() val mScreenRecorderConfigBMethod: Method = mScreenRecorderConfigBDescriptor.getMethodInstance(lpparam.classLoader) - //XposedBridge.log("Cemiuiler: DeviceModify (Updater) dexkit method is $systemPropertiesMethod") + // XposedBridge.log("Cemiuiler: DeviceModify (Updater) dexkit method is $systemPropertiesMethod") mScreenRecorderConfigBMethod.createHook { before { param -> param.args[0] = 1200 @@ -49,15 +49,15 @@ object ScreenRecorderConfig : BaseHook() { it.isAccessible = true }.let { fieldAccessible -> fieldAccessible.isFinal && - fieldAccessible.get(null).let { - kotlin.runCatching { - (it as IntArray).contentEquals(intArrayOf(200, 100, 50, 32, 24, 16, 8, 6, 4, 1)) - }.getOrDefault(false) - } + fieldAccessible.get(null).let { + kotlin.runCatching { + (it as IntArray).contentEquals(intArrayOf(200, 100, 50, 32, 24, 16, 8, 6, 4, 1)) + }.getOrDefault(false) + } } }?.set(null, intArrayOf(1200, 800, 400, 200, 100, 50, 32, 24, 16, 8, 6, 4, 1)) } } } -} \ No newline at end of file +} diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/screenrecorder/ScreenRecorderDexKit.java b/app/src/main/java/com/sevtinge/cemiuiler/module/screenrecorder/ScreenRecorderDexKit.java index a024314a3d..65dbfa69a4 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/screenrecorder/ScreenRecorderDexKit.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/screenrecorder/ScreenRecorderDexKit.java @@ -1,14 +1,15 @@ package com.sevtinge.cemiuiler.module.screenrecorder; import com.sevtinge.cemiuiler.module.base.BaseHook; + +import java.util.List; +import java.util.Map; + import io.luckypray.dexkit.DexKitBridge; import io.luckypray.dexkit.builder.BatchFindArgs; import io.luckypray.dexkit.descriptor.member.DexMethodDescriptor; import io.luckypray.dexkit.enums.MatchType; -import java.util.List; -import java.util.Map; - public class ScreenRecorderDexKit extends BaseHook { public static Map> mScreenRecorderResultMethodsMap; @@ -23,13 +24,13 @@ public void init() { return; } mScreenRecorderResultMethodsMap = - bridge.batchFindMethodsUsingStrings( - BatchFindArgs.builder() - .addQuery("ScreenRecorderConfigA", List.of("Error when set frame value, maxValue = ")) - .addQuery("ScreenRecorderConfigB", List.of("defaultBitRate = ")) - .matchType(MatchType.CONTAINS) - .build() - ); + bridge.batchFindMethodsUsingStrings( + BatchFindArgs.builder() + .addQuery("ScreenRecorderConfigA", List.of("Error when set frame value, maxValue = ")) + .addQuery("ScreenRecorderConfigB", List.of("defaultBitRate = ")) + .matchType(MatchType.CONTAINS) + .build() + ); } catch (Throwable e) { e.printStackTrace(); } diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/screenrecorder/UnlockMoreVolumeFrom.java b/app/src/main/java/com/sevtinge/cemiuiler/module/screenrecorder/UnlockMoreVolumeFrom.java index 3b8b6b4f23..27efaf9ae1 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/screenrecorder/UnlockMoreVolumeFrom.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/screenrecorder/UnlockMoreVolumeFrom.java @@ -1,6 +1,7 @@ package com.sevtinge.cemiuiler.module.screenrecorder; import com.sevtinge.cemiuiler.module.base.BaseHook; + import de.robv.android.xposed.XposedHelpers; public class UnlockMoreVolumeFrom extends BaseHook { diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/screenshot/SaveToPictures.kt b/app/src/main/java/com/sevtinge/cemiuiler/module/screenshot/SaveToPictures.kt index 93649e1f82..6f6c8ca2a6 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/screenshot/SaveToPictures.kt +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/screenshot/SaveToPictures.kt @@ -3,9 +3,9 @@ package com.sevtinge.cemiuiler.module.screenshot import com.sevtinge.cemiuiler.module.base.BaseHook import de.robv.android.xposed.XposedHelpers -object SaveToPictures: BaseHook() { +object SaveToPictures : BaseHook() { override fun init() { val clazz = XposedHelpers.findClass("android.os.Environment", lpparam.classLoader) XposedHelpers.setStaticObjectField(clazz, "DIRECTORY_DCIM", "Pictures") } -} \ No newline at end of file +} diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/screenshot/UnlockMinimumCropLimit.java b/app/src/main/java/com/sevtinge/cemiuiler/module/screenshot/UnlockMinimumCropLimit.java index c02509e7e6..61f618b6fa 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/screenshot/UnlockMinimumCropLimit.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/screenshot/UnlockMinimumCropLimit.java @@ -1,6 +1,7 @@ package com.sevtinge.cemiuiler.module.screenshot; import com.sevtinge.cemiuiler.module.base.BaseHook; + import de.robv.android.xposed.XC_MethodReplacement; public class UnlockMinimumCropLimit extends BaseHook { diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/securitycenter/AppLockPinScramble.java b/app/src/main/java/com/sevtinge/cemiuiler/module/securitycenter/AppLockPinScramble.java index 66b141216e..a5a2420325 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/securitycenter/AppLockPinScramble.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/securitycenter/AppLockPinScramble.java @@ -18,12 +18,12 @@ public void init() { hookAllConstructors("com.miui.applicationlock.widget.MiuiNumericInputView", new MethodHook() { @Override protected void after(MethodHookParam param) throws Throwable { - LinearLayout keys = (LinearLayout)param.thisObject; + LinearLayout keys = (LinearLayout) param.thisObject; ArrayList mRandomViews = new ArrayList(); View bottom0 = null; View bottom2 = null; for (int row = 0; row <= 3; row++) { - ViewGroup cols = (ViewGroup)keys.getChildAt(row); + ViewGroup cols = (ViewGroup) keys.getChildAt(row); for (int col = 0; col <= 2; col++) { if (row == 3) if (col == 0) { @@ -43,7 +43,7 @@ protected void after(MethodHookParam param) throws Throwable { int cnt = 0; for (int row = 0; row <= 3; row++) for (int col = 0; col <= 2; col++) { - ViewGroup cols = (ViewGroup)keys.getChildAt(row); + ViewGroup cols = (ViewGroup) keys.getChildAt(row); if (row == 3) if (col == 0) { cols.addView(bottom0); diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/securitycenter/BlurSecurity.kt b/app/src/main/java/com/sevtinge/cemiuiler/module/securitycenter/BlurSecurity.kt index 20427fa547..fbdc7e97e8 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/securitycenter/BlurSecurity.kt +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/securitycenter/BlurSecurity.kt @@ -1,7 +1,9 @@ package com.sevtinge.cemiuiler.module.securitycenter import android.content.Context -import android.graphics.* +import android.graphics.Color +import android.graphics.ColorMatrixColorFilter +import android.graphics.RenderEffect import android.graphics.drawable.LayerDrawable import android.graphics.drawable.VectorDrawable import android.os.Build @@ -160,7 +162,7 @@ object BlurSecurity : BaseHook() { if (shouldInvertColor) { invertViewColor(gameContentLayout) - //设置 RenderEffect 后会导致文字动画出现问题,故去除动画 + // 设置 RenderEffect 后会导致文字动画出现问题,故去除动画 val performanceTextView = XposedHelpers.callMethod( param.thisObject, "getPerformanceTextView" diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/securitycenter/DisableReport.java b/app/src/main/java/com/sevtinge/cemiuiler/module/securitycenter/DisableReport.java index 600ff9a2cc..9e7b27188b 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/securitycenter/DisableReport.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/securitycenter/DisableReport.java @@ -17,7 +17,7 @@ public void init() { List result = Objects.requireNonNull(SecurityCenterDexKit.mSecurityCenterResultMap.get("IsShowReport")); for (DexMethodDescriptor descriptor : result) { Method isShowReport = descriptor.getMethodInstance(lpparam.classLoader); - log("isShowReport method is "+ isShowReport); + log("isShowReport method is " + isShowReport); if (isShowReport.getReturnType() == boolean.class) { XposedBridge.hookMethod(isShowReport, XC_MethodReplacement.returnConstant(false)); } diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/securitycenter/DisableRootCheck.java b/app/src/main/java/com/sevtinge/cemiuiler/module/securitycenter/DisableRootCheck.java index a06d59bbe1..779091a346 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/securitycenter/DisableRootCheck.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/securitycenter/DisableRootCheck.java @@ -1,18 +1,15 @@ package com.sevtinge.cemiuiler.module.securitycenter; import com.sevtinge.cemiuiler.module.base.BaseHook; -import de.robv.android.xposed.XC_MethodReplacement; -import de.robv.android.xposed.XposedBridge; -import io.luckypray.dexkit.DexKitBridge; -import io.luckypray.dexkit.builder.BatchFindArgs; -import io.luckypray.dexkit.descriptor.member.DexMethodDescriptor; -import io.luckypray.dexkit.enums.MatchType; import java.lang.reflect.Method; import java.util.List; -import java.util.Map; import java.util.Objects; +import de.robv.android.xposed.XC_MethodReplacement; +import de.robv.android.xposed.XposedBridge; +import io.luckypray.dexkit.descriptor.member.DexMethodDescriptor; + public class DisableRootCheck extends BaseHook { @Override public void init() { @@ -31,4 +28,3 @@ public void init() { } - \ No newline at end of file diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/securitycenter/FuckRiskPkg.kt b/app/src/main/java/com/sevtinge/cemiuiler/module/securitycenter/FuckRiskPkg.kt index f5810ea93c..68dfbf2bbf 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/securitycenter/FuckRiskPkg.kt +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/securitycenter/FuckRiskPkg.kt @@ -28,7 +28,11 @@ object FuckRiskPkg : BaseHook() { } } } else { - log("Your Security Version is $appVersionName (The version suffix is ${appVersionName.split(".").last()}), and does not meet the usage requirements") + log( + "Your Security Version is $appVersionName (The version suffix is ${ + appVersionName.split(".").last() + }), and does not meet the usage requirements" + ) } } -} \ No newline at end of file +} diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/securitycenter/LockOneHundredPoints.java b/app/src/main/java/com/sevtinge/cemiuiler/module/securitycenter/LockOneHundredPoints.java index 8cc21f98cc..c61e918fc8 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/securitycenter/LockOneHundredPoints.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/securitycenter/LockOneHundredPoints.java @@ -4,18 +4,15 @@ import com.sevtinge.cemiuiler.module.base.BaseHook; import com.sevtinge.cemiuiler.utils.PrefsUtils; -import de.robv.android.xposed.XC_MethodReplacement; -import de.robv.android.xposed.XposedBridge; -import io.luckypray.dexkit.DexKitBridge; -import io.luckypray.dexkit.builder.BatchFindArgs; -import io.luckypray.dexkit.descriptor.member.DexMethodDescriptor; -import io.luckypray.dexkit.enums.MatchType; import java.lang.reflect.Method; import java.util.List; -import java.util.Map; import java.util.Objects; +import de.robv.android.xposed.XC_MethodReplacement; +import de.robv.android.xposed.XposedBridge; +import io.luckypray.dexkit.descriptor.member.DexMethodDescriptor; + public class LockOneHundredPoints extends BaseHook { Class mScoreManagerCls; @@ -31,7 +28,7 @@ public void init() { List result = Objects.requireNonNull(SecurityCenterDexKit.mSecurityCenterResultMap.get("ScoreManager")); for (DexMethodDescriptor descriptor : result) { Method lockOneHundredPoints = descriptor.getMethodInstance(lpparam.classLoader); - log("lock 100 points method is "+ lockOneHundredPoints); + log("lock 100 points method is " + lockOneHundredPoints); if (lockOneHundredPoints.getReturnType() == int.class) { XposedBridge.hookMethod(lockOneHundredPoints, XC_MethodReplacement.returnConstant(0)); } @@ -50,7 +47,8 @@ protected void before(MethodHookParam param) throws Throwable { findAndHookMethod(mMainContentFrameCls, "onClick", View.class, new MethodHook() { @Override protected void before(MethodHookParam param) throws Throwable { - if(PrefsUtils.mSharedPreferences.getBoolean("prefs_key_security_center_score", false)) param.setResult(null); + if (PrefsUtils.mSharedPreferences.getBoolean("prefs_key_security_center_score", false)) + param.setResult(null); } }); } diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/securitycenter/NewBoxBlur.java b/app/src/main/java/com/sevtinge/cemiuiler/module/securitycenter/NewBoxBlur.java index 25ef797e0f..a6b6f6ee8d 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/securitycenter/NewBoxBlur.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/securitycenter/NewBoxBlur.java @@ -70,7 +70,7 @@ protected void after(MethodHookParam param) throws Throwable { findAndHookMethod(mTurboaLayout, "a", boolean.class, boolean.class, new MethodHook() { @Override protected void after(MethodHookParam param) throws Throwable { - ImageView view = (ImageView) XposedHelpers.getObjectField(param.thisObject,"j"); + ImageView view = (ImageView) XposedHelpers.getObjectField(param.thisObject, "j"); GradientDrawable shapeDrawable = new GradientDrawable(); shapeDrawable.setColor(Color.TRANSPARENT); view.setImageDrawable(shapeDrawable); diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/securitycenter/RemoveConversationBubbleSettingsRestriction.kt b/app/src/main/java/com/sevtinge/cemiuiler/module/securitycenter/RemoveConversationBubbleSettingsRestriction.kt index daa80acced..88bd33e55f 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/securitycenter/RemoveConversationBubbleSettingsRestriction.kt +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/securitycenter/RemoveConversationBubbleSettingsRestriction.kt @@ -1,16 +1,16 @@ package com.sevtinge.cemiuiler.module.securitycenter -import com.sevtinge.cemiuiler.module.base.BaseHook import android.annotation.SuppressLint import android.content.Context import android.util.ArrayMap import com.github.kyuubiran.ezxhelper.ClassUtils.loadClass import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHook import com.github.kyuubiran.ezxhelper.finders.MethodFinder.`-Static`.methodFinder +import com.sevtinge.cemiuiler.module.base.BaseHook import com.sevtinge.cemiuiler.utils.getObjectField import org.lsposed.hiddenapibypass.HiddenApiBypass -class RemoveConversationBubbleSettingsRestriction : BaseHook(){ +class RemoveConversationBubbleSettingsRestriction : BaseHook() { @SuppressLint("PrivateApi") override fun init() { loadClass("com.miui.bubbles.settings.BubblesSettings").methodFinder().first { @@ -41,4 +41,4 @@ class RemoveConversationBubbleSettingsRestriction : BaseHook(){ } } } -} \ No newline at end of file +} diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/securitycenter/SecurityCenterDexKit.java b/app/src/main/java/com/sevtinge/cemiuiler/module/securitycenter/SecurityCenterDexKit.java index f65daaf8f8..8e6fc67d32 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/securitycenter/SecurityCenterDexKit.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/securitycenter/SecurityCenterDexKit.java @@ -1,15 +1,16 @@ package com.sevtinge.cemiuiler.module.securitycenter; import com.sevtinge.cemiuiler.module.base.BaseHook; + +import java.util.List; +import java.util.Map; + import io.luckypray.dexkit.DexKitBridge; import io.luckypray.dexkit.builder.BatchFindArgs; import io.luckypray.dexkit.descriptor.member.DexClassDescriptor; import io.luckypray.dexkit.descriptor.member.DexMethodDescriptor; import io.luckypray.dexkit.enums.MatchType; -import java.util.List; -import java.util.Map; - public class SecurityCenterDexKit extends BaseHook { public static Map> mSecurityCenterResultMap; @@ -25,30 +26,30 @@ public void init() { return; } mSecurityCenterResultMap = - bridge.batchFindMethodsUsingStrings( - BatchFindArgs.builder() - .addQuery("BeautyFace", List.of("taoyao", "IN", "persist.vendor.vcb.ability")) - .addQuery("BeautyPc", List.of("persist.vendor.camera.facetracker.support")) - .addQuery("BeautyLightAuto", List.of("taoyao")) - .addQuery("ScoreManager", List.of("getMinusPredictScore------------------------------------------------ ")) - .addQuery("rootCheck", List.of("key_check_item_root")) - .addQuery("SuperWirelessCharge", List.of("persist.vendor.tx.speed.control")) - .addQuery("SuperWirelessChargeTip", List.of("key_is_connected_super_wls_tx")) - .addQuery("Macro2", List.of("pref_gb_unsupport_macro_apps")) - .addQuery("IsShowReport", List.of("android.intent.action.VIEW", "com.xiaomi.market")) - .addQuery("FuckRiskPkg", List.of("riskPkgList", "key_virus_pkg_list", "show_virus_notification")) - .matchType(MatchType.CONTAINS) - .build() - ); + bridge.batchFindMethodsUsingStrings( + BatchFindArgs.builder() + .addQuery("BeautyFace", List.of("taoyao", "IN", "persist.vendor.vcb.ability")) + .addQuery("BeautyPc", List.of("persist.vendor.camera.facetracker.support")) + .addQuery("BeautyLightAuto", List.of("taoyao")) + .addQuery("ScoreManager", List.of("getMinusPredictScore------------------------------------------------ ")) + .addQuery("rootCheck", List.of("key_check_item_root")) + .addQuery("SuperWirelessCharge", List.of("persist.vendor.tx.speed.control")) + .addQuery("SuperWirelessChargeTip", List.of("key_is_connected_super_wls_tx")) + .addQuery("Macro2", List.of("pref_gb_unsupport_macro_apps")) + .addQuery("IsShowReport", List.of("android.intent.action.VIEW", "com.xiaomi.market")) + .addQuery("FuckRiskPkg", List.of("riskPkgList", "key_virus_pkg_list", "show_virus_notification")) + .matchType(MatchType.CONTAINS) + .build() + ); mSecurityCenterResultClassMap = - bridge.batchFindClassesUsingStrings( - BatchFindArgs.builder() - .addQuery("Macro", List.of("pref_gb_unsupport_macro_apps", "gb_game_gunsight", "com.tencent.tmgp.sgame")) - .addQuery("Macro1", List.of("key_macro_toast", "content://com.xiaomi.macro.MacroStatusProvider/game_macro_change")) - .addQuery("LabUtils", List.of("mi_lab_ai_clipboard_enable", "mi_lab_blur_location_enable")) - .matchType(MatchType.CONTAINS) - .build() - ); + bridge.batchFindClassesUsingStrings( + BatchFindArgs.builder() + .addQuery("Macro", List.of("pref_gb_unsupport_macro_apps", "gb_game_gunsight", "com.tencent.tmgp.sgame")) + .addQuery("Macro1", List.of("key_macro_toast", "content://com.xiaomi.macro.MacroStatusProvider/game_macro_change")) + .addQuery("LabUtils", List.of("mi_lab_ai_clipboard_enable", "mi_lab_blur_location_enable")) + .matchType(MatchType.CONTAINS) + .build() + ); } catch (Throwable e) { e.printStackTrace(); } diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/securitycenter/ShowBatteryTemperature.java b/app/src/main/java/com/sevtinge/cemiuiler/module/securitycenter/ShowBatteryTemperature.java index d34754cbe7..20155789b7 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/securitycenter/ShowBatteryTemperature.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/securitycenter/ShowBatteryTemperature.java @@ -14,10 +14,10 @@ import android.widget.RelativeLayout; import android.widget.TextView; +import com.sevtinge.cemiuiler.module.base.BaseHook; + import java.lang.reflect.Method; -import com.sevtinge.cemiuiler.module.base.BaseHook; -import de.robv.android.xposed.XposedBridge; import de.robv.android.xposed.XposedHelpers; import moralnorm.internal.utils.DisplayUtils; @@ -33,7 +33,7 @@ public void init() { Method[] methods = mBatteryFragment.getDeclaredMethods(); for (Method method : methods) { - if (method.getReturnType() == String.class && method.getParameterCount() == 1 ) { + if (method.getReturnType() == String.class && method.getParameterCount() == 1) { hookMethod(method, new MethodHook() { @Override protected void before(MethodHookParam param) throws Throwable { @@ -86,7 +86,7 @@ private void applyTextView(Context context, TextView tv) { private void applyTemperatureStyle(Context context, TextView tv, boolean isDarkMode) { LinearLayout.LayoutParams lp = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT); - lp.setMargins(DisplayUtils.dp2px(context, 3), 0,0, 0); + lp.setMargins(DisplayUtils.dp2px(context, 3), 0, 0, 0); tv.setLayoutParams(lp); tv.setText("℃"); tv.setTextColor(Color.parseColor(isDarkMode ? "#e6e6e6" : "#333333")); @@ -100,4 +100,4 @@ private void applyTemperatureStyle(Context context, TextView tv, boolean isDarkM private int getBatteryTemperature(Context context) { return context.registerReceiver((BroadcastReceiver) null, new IntentFilter("android.intent.action.BATTERY_CHANGED")).getIntExtra("temperature", 0) / 10; } -} \ No newline at end of file +} diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/securitycenter/ShowBatteryTemperatureNew.kt b/app/src/main/java/com/sevtinge/cemiuiler/module/securitycenter/ShowBatteryTemperatureNew.kt index 06adf46df1..772146dd75 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/securitycenter/ShowBatteryTemperatureNew.kt +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/securitycenter/ShowBatteryTemperatureNew.kt @@ -28,7 +28,7 @@ object ShowBatteryTemperatureNew : BaseHook() { @SuppressLint("DiscouragedApi") override fun init() { - //if (!getBoolean("securitycenter_show_battery_temperature", false)) return + // if (!getBoolean("securitycenter_show_battery_temperature", false)) return val batteryFragmentClass = "com.miui.powercenter.BatteryFragment".findClassOrNull() if (batteryFragmentClass != null) { loadClass("com.miui.powercenter.BatteryFragment").methodFinder().first { @@ -55,8 +55,10 @@ object ShowBatteryTemperatureNew : BaseHook() { }.createHook { after { hookParam -> val context = AndroidAppHelper.currentApplication().applicationContext - val isDarkMode = context.resources.configuration.uiMode and Configuration.UI_MODE_NIGHT_MASK == Configuration.UI_MODE_NIGHT_YES - val currentTemperatureState = context.resources.getIdentifier("current_temperature_state", "id", "com.miui.securitycenter") + val isDarkMode = + context.resources.configuration.uiMode and Configuration.UI_MODE_NIGHT_MASK == Configuration.UI_MODE_NIGHT_YES + val currentTemperatureState = + context.resources.getIdentifier("current_temperature_state", "id", "com.miui.securitycenter") val view = hookParam.thisObject.getObjectFieldAs("a") val textView = view.findViewById(currentTemperatureState) @@ -74,7 +76,8 @@ object ShowBatteryTemperatureNew : BaseHook() { textAlignment = View.TEXT_ALIGNMENT_VIEW_START } - val temperatureContainer = context.resources.getIdentifier("temperature_container", "id", "com.miui.securitycenter") + val temperatureContainer = + context.resources.getIdentifier("temperature_container", "id", "com.miui.securitycenter") when (val childView = view.findViewById(temperatureContainer).getChildAt(1)) { is LinearLayout -> { childView.orientation = LinearLayout.VERTICAL @@ -83,7 +86,10 @@ object ShowBatteryTemperatureNew : BaseHook() { val linearLayout = LinearLayout(context) val linearLayout1 = LinearLayout(context).apply { orientation = LinearLayout.HORIZONTAL } val tempView = TextView(context).apply { - layoutParams = LinearLayout.LayoutParams(LinearLayout.LayoutParams.WRAP_CONTENT, LinearLayout.LayoutParams.WRAP_CONTENT) + layoutParams = LinearLayout.LayoutParams( + LinearLayout.LayoutParams.WRAP_CONTENT, + LinearLayout.LayoutParams.WRAP_CONTENT + ) (layoutParams as LinearLayout.LayoutParams).marginStart = dp2px(context, 3.6f) setTextSize(TypedValue.COMPLEX_UNIT_DIP, 13.1f) setTextColor(Color.parseColor(if (isDarkMode) "#e6e6e6" else "#333333")) @@ -105,14 +111,20 @@ object ShowBatteryTemperatureNew : BaseHook() { val relativeLayout = RelativeLayout(context) val l1 = childView.getChildAt(0) val l2 = childView.getChildAt(1).apply { - layoutParams = RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.WRAP_CONTENT, RelativeLayout.LayoutParams.WRAP_CONTENT).also { + layoutParams = RelativeLayout.LayoutParams( + RelativeLayout.LayoutParams.WRAP_CONTENT, + RelativeLayout.LayoutParams.WRAP_CONTENT + ).also { it.addRule(RelativeLayout.BELOW, l1.id) it.addRule(RelativeLayout.ALIGN_START, l1.id) } (layoutParams as RelativeLayout.LayoutParams).topMargin = -dp2px(context, 0.78f) } val tempView = TextView(context).apply { - layoutParams = RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.WRAP_CONTENT, RelativeLayout.LayoutParams.WRAP_CONTENT).also { + layoutParams = RelativeLayout.LayoutParams( + RelativeLayout.LayoutParams.WRAP_CONTENT, + RelativeLayout.LayoutParams.WRAP_CONTENT + ).also { it.addRule(RelativeLayout.END_OF, l2.id) it.addRule(RelativeLayout.ALIGN_BOTTOM, l2.id) } @@ -136,7 +148,10 @@ object ShowBatteryTemperatureNew : BaseHook() { } private fun getBatteryTemperature(context: Context): Int { - return context.registerReceiver(null as BroadcastReceiver?, IntentFilter("android.intent.action.BATTERY_CHANGED"))!! + return context.registerReceiver( + null as BroadcastReceiver?, + IntentFilter("android.intent.action.BATTERY_CHANGED") + )!! .getIntExtra("temperature", 0) / 10 } -} \ No newline at end of file +} diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/securitycenter/SidebarLineCustom.kt b/app/src/main/java/com/sevtinge/cemiuiler/module/securitycenter/SidebarLineCustom.kt index ffc3027917..37528b9b9e 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/securitycenter/SidebarLineCustom.kt +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/securitycenter/SidebarLineCustom.kt @@ -7,7 +7,7 @@ object SidebarLineCustom : BaseHook() { override fun init() {} - fun initResource(resParam: XC_InitPackageResources.InitPackageResourcesParam){ + fun initResource(resParam: XC_InitPackageResources.InitPackageResourcesParam) { val mSidebarLineColorDefault = mPrefsMap.getInt("security_center_sidebar_line_color_default", -1294740525) val mSidebarLineColorDark = mPrefsMap.getInt("security_center_sidebar_line_color_dark", -6842473) val mSidebarLineColorLight = mPrefsMap.getInt("security_center_sidebar_line_color_light", -872415232) @@ -35,4 +35,4 @@ object SidebarLineCustom : BaseHook() { } -} \ No newline at end of file +} diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/securitycenter/SkipCountDownLimit.java b/app/src/main/java/com/sevtinge/cemiuiler/module/securitycenter/SkipCountDownLimit.java index 5d2544a84c..510c4903c3 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/securitycenter/SkipCountDownLimit.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/securitycenter/SkipCountDownLimit.java @@ -21,7 +21,7 @@ public void init() { mInnerClasses = mInterceptBaseFragmentCls.getDeclaredClasses(); - findAndHookMethod("android.widget.TextView","setEnabled", boolean.class, new MethodHook() { + findAndHookMethod("android.widget.TextView", "setEnabled", boolean.class, new MethodHook() { @Override protected void before(MethodHookParam param) throws Throwable { param.args[0] = true; diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/securitycenter/UnlockSuperWirelessCharge.java b/app/src/main/java/com/sevtinge/cemiuiler/module/securitycenter/UnlockSuperWirelessCharge.java index 891f0e7459..3577546ff7 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/securitycenter/UnlockSuperWirelessCharge.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/securitycenter/UnlockSuperWirelessCharge.java @@ -1,20 +1,15 @@ package com.sevtinge.cemiuiler.module.securitycenter; -import android.view.View; import com.sevtinge.cemiuiler.module.base.BaseHook; -import com.sevtinge.cemiuiler.utils.PrefsUtils; -import de.robv.android.xposed.XC_MethodReplacement; -import de.robv.android.xposed.XposedBridge; -import io.luckypray.dexkit.DexKitBridge; -import io.luckypray.dexkit.builder.BatchFindArgs; -import io.luckypray.dexkit.descriptor.member.DexMethodDescriptor; -import io.luckypray.dexkit.enums.MatchType; import java.lang.reflect.Method; import java.util.List; -import java.util.Map; import java.util.Objects; +import de.robv.android.xposed.XC_MethodReplacement; +import de.robv.android.xposed.XposedBridge; +import io.luckypray.dexkit.descriptor.member.DexMethodDescriptor; + public class UnlockSuperWirelessCharge extends BaseHook { @Override public void init() { @@ -22,18 +17,19 @@ public void init() { List result = Objects.requireNonNull(SecurityCenterDexKit.mSecurityCenterResultMap.get("SuperWirelessCharge")); for (DexMethodDescriptor descriptor : result) { Method SuperWirelessCharge = descriptor.getMethodInstance(lpparam.classLoader); - log("SuperWirelessCharge method is "+ SuperWirelessCharge); + log("SuperWirelessCharge method is " + SuperWirelessCharge); if (SuperWirelessCharge.getReturnType() == boolean.class) { XposedBridge.hookMethod(SuperWirelessCharge, XC_MethodReplacement.returnConstant(true)); } } } catch (Throwable e) { e.printStackTrace(); - } try { + } + try { List result = Objects.requireNonNull(SecurityCenterDexKit.mSecurityCenterResultMap.get("SuperWirelessChargeTip")); for (DexMethodDescriptor descriptor : result) { Method SuperWirelessChargeTip = descriptor.getMethodInstance(lpparam.classLoader); - log("SuperWirelessChargeTip method is "+ SuperWirelessChargeTip); + log("SuperWirelessChargeTip method is " + SuperWirelessChargeTip); if (SuperWirelessChargeTip.getReturnType() == boolean.class) { XposedBridge.hookMethod(SuperWirelessChargeTip, XC_MethodReplacement.returnConstant(true)); } diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/securitycenter/app/AppDefaultSort.java b/app/src/main/java/com/sevtinge/cemiuiler/module/securitycenter/app/AppDefaultSort.java index 6b080d77fe..66e5eec133 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/securitycenter/app/AppDefaultSort.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/securitycenter/app/AppDefaultSort.java @@ -26,10 +26,10 @@ public void init() { findAndHookMethod(mAppManagerCls, "onCreate", Bundle.class, new MethodHook() { @Override protected void before(MethodHookParam param) throws Throwable { - param.args[0] = checkBundle((Context)param.thisObject, (Bundle)param.args[0]); + param.args[0] = checkBundle((Context) param.thisObject, (Bundle) param.args[0]); Class mFragXCls = findClassIfExists("androidx.fragment.app.Fragment"); Field[] fields = param.thisObject.getClass().getDeclaredFields(); - for (Field field: fields) { + for (Field field : fields) { if (Fragment.class.isAssignableFrom(field.getType()) || (mFragXCls != null && mFragXCls.isAssignableFrom(field.getType()))) { fragCls = field.getType().getCanonicalName(); break; @@ -40,7 +40,7 @@ protected void before(MethodHookParam param) throws Throwable { @Override protected void before(final MethodHookParam param) throws Throwable { try { - param.args[0] = checkBundle((Context)XposedHelpers.callMethod(param.thisObject, "getContext"), (Bundle)param.args[0]); + param.args[0] = checkBundle((Context) XposedHelpers.callMethod(param.thisObject, "getContext"), (Bundle) param.args[0]); } catch (Throwable t) { LogUtils.log("AppDefaultSortHook", t); } diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/securitycenter/app/AppDetails.java b/app/src/main/java/com/sevtinge/cemiuiler/module/securitycenter/app/AppDetails.java index 31b48effca..ef8115ad70 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/securitycenter/app/AppDetails.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/securitycenter/app/AppDetails.java @@ -76,97 +76,97 @@ public void run() { return; } - final Resources modRes; - try { - modRes = XposedUtils.getModuleRes(act); - Field piField = XposedHelpers.findFirstFieldByExactType(frag.getClass(), PackageInfo.class); - mLastPackageInfo = (PackageInfo)piField.get(frag); - Method[] addPref = XposedHelpers.findMethodsByExactParameters(frag.getClass(), void.class, String.class, String.class, String.class); - if (mLastPackageInfo == null || addPref.length == 0) { - LogUtils.log("Unable to find field/class/method in SecurityCenter to hook"); - return; - } else { - addPref[0].setAccessible(true); - } - addPref[0].invoke(frag, "apk_versioncode", modRes.getString(R.string.app_details_apk_version_code), String.valueOf(mLastPackageInfo.versionCode)); - addPref[0].invoke(frag, "app_uid", modRes.getString(R.string.app_details_app_uid), String.valueOf(mLastPackageInfo.applicationInfo.uid)); - addPref[0].invoke(frag, "data_path", modRes.getString(R.string.app_details_data_path), mLastPackageInfo.applicationInfo.dataDir); - addPref[0].invoke(frag, "apk_filename", modRes.getString(R.string.app_details_apk_file), mLastPackageInfo.applicationInfo.sourceDir); - addPref[0].invoke(frag, "min_sdk", modRes.getString(R.string.app_details_min_sdk), String.valueOf(mLastPackageInfo.applicationInfo.minSdkVersion)); - addPref[0].invoke(frag, "target_sdk", modRes.getString(R.string.app_details_sdk), String.valueOf(mLastPackageInfo.applicationInfo.targetSdkVersion)); - handler.post(new Runnable() { - @Override - public void run() { - try { - addPref[0].invoke(frag, "open_in_market", modRes.getString(R.string.app_details_playstore), ""); - addPref[0].invoke(frag, "open_in_app", modRes.getString(R.string.app_details_launch), ""); - } catch (Throwable t) { - LogUtils.log(t); - } + final Resources modRes; + try { + modRes = XposedUtils.getModuleRes(act); + Field piField = XposedHelpers.findFirstFieldByExactType(frag.getClass(), PackageInfo.class); + mLastPackageInfo = (PackageInfo) piField.get(frag); + Method[] addPref = XposedHelpers.findMethodsByExactParameters(frag.getClass(), void.class, String.class, String.class, String.class); + if (mLastPackageInfo == null || addPref.length == 0) { + LogUtils.log("Unable to find field/class/method in SecurityCenter to hook"); + return; + } else { + addPref[0].setAccessible(true); } - }); - } catch (Throwable t) { - LogUtils.log(t); - return; - } - - hookAllMethods(frag.getClass(), "onPreferenceTreeClick", new MethodHook() { - @Override - protected void before(MethodHookParam param1) throws Throwable { - String key = (String)XposedHelpers.callMethod(param1.args[0], "getKey"); - String title = (String)XposedHelpers.callMethod(param1.args[0], "getTitle"); - switch (key) { - case "apk_filename" -> { - ((ClipboardManager) act.getSystemService(Context.CLIPBOARD_SERVICE)).setPrimaryClip(ClipData.newPlainText(title, mLastPackageInfo.applicationInfo.sourceDir)); - Toast.makeText(act, act.getResources().getIdentifier("app_manager_copy_pkg_to_clip", "string", act.getPackageName()), Toast.LENGTH_SHORT).show(); - param1.setResult(true); - } - case "data_path" -> { - ((ClipboardManager) act.getSystemService(Context.CLIPBOARD_SERVICE)).setPrimaryClip(ClipData.newPlainText(title, mLastPackageInfo.applicationInfo.dataDir)); - Toast.makeText(act, act.getResources().getIdentifier("app_manager_copy_pkg_to_clip", "string", act.getPackageName()), Toast.LENGTH_SHORT).show(); - param1.setResult(true); - } - case "open_in_market" -> { + addPref[0].invoke(frag, "apk_versioncode", modRes.getString(R.string.app_details_apk_version_code), String.valueOf(mLastPackageInfo.versionCode)); + addPref[0].invoke(frag, "app_uid", modRes.getString(R.string.app_details_app_uid), String.valueOf(mLastPackageInfo.applicationInfo.uid)); + addPref[0].invoke(frag, "data_path", modRes.getString(R.string.app_details_data_path), mLastPackageInfo.applicationInfo.dataDir); + addPref[0].invoke(frag, "apk_filename", modRes.getString(R.string.app_details_apk_file), mLastPackageInfo.applicationInfo.sourceDir); + addPref[0].invoke(frag, "min_sdk", modRes.getString(R.string.app_details_min_sdk), String.valueOf(mLastPackageInfo.applicationInfo.minSdkVersion)); + addPref[0].invoke(frag, "target_sdk", modRes.getString(R.string.app_details_sdk), String.valueOf(mLastPackageInfo.applicationInfo.targetSdkVersion)); + handler.post(new Runnable() { + @Override + public void run() { try { - Intent launchIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("market://details?id=" + mLastPackageInfo.packageName)); - launchIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED); - act.startActivity(launchIntent); - } catch ( - android.content.ActivityNotFoundException anfe) { - Intent launchIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("https://play.google.com/store/apps/details?id=" + mLastPackageInfo.packageName)); - launchIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED); - act.startActivity(launchIntent); + addPref[0].invoke(frag, "open_in_market", modRes.getString(R.string.app_details_playstore), ""); + addPref[0].invoke(frag, "open_in_app", modRes.getString(R.string.app_details_launch), ""); + } catch (Throwable t) { + LogUtils.log(t); } - param1.setResult(true); } - case "open_in_app" -> { - Intent launchIntent = act.getPackageManager().getLaunchIntentForPackage(mLastPackageInfo.packageName); - if (launchIntent == null) { - Toast.makeText(act, modRes.getString(R.string.app_details_nolaunch), Toast.LENGTH_SHORT).show(); - } else { - int user = 0; + }); + } catch (Throwable t) { + LogUtils.log(t); + return; + } + + hookAllMethods(frag.getClass(), "onPreferenceTreeClick", new MethodHook() { + @Override + protected void before(MethodHookParam param1) throws Throwable { + String key = (String) XposedHelpers.callMethod(param1.args[0], "getKey"); + String title = (String) XposedHelpers.callMethod(param1.args[0], "getTitle"); + switch (key) { + case "apk_filename" -> { + ((ClipboardManager) act.getSystemService(Context.CLIPBOARD_SERVICE)).setPrimaryClip(ClipData.newPlainText(title, mLastPackageInfo.applicationInfo.sourceDir)); + Toast.makeText(act, act.getResources().getIdentifier("app_manager_copy_pkg_to_clip", "string", act.getPackageName()), Toast.LENGTH_SHORT).show(); + param1.setResult(true); + } + case "data_path" -> { + ((ClipboardManager) act.getSystemService(Context.CLIPBOARD_SERVICE)).setPrimaryClip(ClipData.newPlainText(title, mLastPackageInfo.applicationInfo.dataDir)); + Toast.makeText(act, act.getResources().getIdentifier("app_manager_copy_pkg_to_clip", "string", act.getPackageName()), Toast.LENGTH_SHORT).show(); + param1.setResult(true); + } + case "open_in_market" -> { try { - int uid = act.getIntent().getIntExtra("am_app_uid", -1); - user = (int) XposedHelpers.callStaticMethod(UserHandle.class, "getUserId", uid); - } catch (Throwable t) { - LogUtils.log(t); + Intent launchIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("market://details?id=" + mLastPackageInfo.packageName)); + launchIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED); + act.startActivity(launchIntent); + } catch ( + android.content.ActivityNotFoundException anfe) { + Intent launchIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("https://play.google.com/store/apps/details?id=" + mLastPackageInfo.packageName)); + launchIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED); + act.startActivity(launchIntent); } - - launchIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED); - if (user != 0) { + param1.setResult(true); + } + case "open_in_app" -> { + Intent launchIntent = act.getPackageManager().getLaunchIntentForPackage(mLastPackageInfo.packageName); + if (launchIntent == null) { + Toast.makeText(act, modRes.getString(R.string.app_details_nolaunch), Toast.LENGTH_SHORT).show(); + } else { + int user = 0; try { - XposedHelpers.callMethod(act, "startActivityAsUser", launchIntent, XposedHelpers.newInstance(UserHandle.class, user)); + int uid = act.getIntent().getIntExtra("am_app_uid", -1); + user = (int) XposedHelpers.callStaticMethod(UserHandle.class, "getUserId", uid); } catch (Throwable t) { LogUtils.log(t); } - } else { - act.startActivity(launchIntent); + + launchIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED); + if (user != 0) { + try { + XposedHelpers.callMethod(act, "startActivityAsUser", launchIntent, XposedHelpers.newInstance(UserHandle.class, user)); + } catch (Throwable t) { + LogUtils.log(t); + } + } else { + act.startActivity(launchIntent); + } } + param.setResult(true); } - param.setResult(true); } } - } }); } }); diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/securitycenter/app/AppDisable.java b/app/src/main/java/com/sevtinge/cemiuiler/module/securitycenter/app/AppDisable.java index e68ad2d303..370eda4b61 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/securitycenter/app/AppDisable.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/securitycenter/app/AppDisable.java @@ -38,11 +38,11 @@ protected void after(MethodHookParam param) throws Throwable { dis.setIcon(act.getResources().getIdentifier("action_button_stop_svg", "drawable", lpparam.packageName)); dis.setEnabled(true); dis.setShowAsAction(1); - //XposedHelpers.setAdditionalInstanceField(param.thisObject, "mDisableButton", dis); + // XposedHelpers.setAdditionalInstanceField(param.thisObject, "mDisableButton", dis); PackageManager pm = act.getPackageManager(); Field piField = XposedHelpers.findFirstFieldByExactType(act.getClass(), PackageInfo.class); - PackageInfo mPackageInfo = (PackageInfo)piField.get(act); + PackageInfo mPackageInfo = (PackageInfo) piField.get(act); ApplicationInfo appInfo = pm.getApplicationInfo(mPackageInfo.packageName, PackageManager.GET_META_DATA); boolean isSystem = (appInfo.flags & ApplicationInfo.FLAG_SYSTEM) != 0; boolean isUpdatedSystem = (appInfo.flags & ApplicationInfo.FLAG_UPDATED_SYSTEM_APP) != 0; @@ -88,11 +88,11 @@ protected void after(MethodHookParam param) throws Throwable { String title = modRes.getString(R.string.disable_app_title); String text = modRes.getString(R.string.disable_app_text); new AlertDialog.Builder(act) - .setTitle(title) - .setMessage(text) - .setPositiveButton(android.R.string.ok, (dialog, which) -> setAppState(act, mPackageInfo.packageName, item, false)) - .setNegativeButton(android.R.string.cancel, null) - .show(); + .setTitle(title) + .setMessage(text) + .setPositiveButton(android.R.string.ok, (dialog, which) -> setAppState(act, mPackageInfo.packageName, item, false)) + .setNegativeButton(android.R.string.cancel, null) + .show(); } else { setAppState(act, mPackageInfo.packageName, item, false); } diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/securitycenter/app/AppRestrict.java b/app/src/main/java/com/sevtinge/cemiuiler/module/securitycenter/app/AppRestrict.java index 417bb072cc..5bc9e9c622 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/securitycenter/app/AppRestrict.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/securitycenter/app/AppRestrict.java @@ -28,7 +28,7 @@ public void init() { @Override protected void after(MethodHookParam param) throws Throwable { if ((int) param.args[3] == 128 && (int) param.args[4] == 0) { - ApplicationInfo appInfo = (ApplicationInfo)param.getResult(); + ApplicationInfo appInfo = (ApplicationInfo) param.getResult(); appInfo.flags &= ~ApplicationInfo.FLAG_SYSTEM; param.setResult(appInfo); } diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/securitycenter/beauty/BeautyFace.java b/app/src/main/java/com/sevtinge/cemiuiler/module/securitycenter/beauty/BeautyFace.java index 5754743f72..d93af90c42 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/securitycenter/beauty/BeautyFace.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/securitycenter/beauty/BeautyFace.java @@ -2,22 +2,15 @@ import com.sevtinge.cemiuiler.module.base.BaseHook; import com.sevtinge.cemiuiler.module.securitycenter.SecurityCenterDexKit; -import de.robv.android.xposed.XC_MethodHook; -import de.robv.android.xposed.XC_MethodReplacement; -import de.robv.android.xposed.XposedBridge; -import de.robv.android.xposed.XposedHelpers; -import de.robv.android.xposed.callbacks.XC_LoadPackage; -import io.luckypray.dexkit.DexKitBridge; -import io.luckypray.dexkit.builder.BatchFindArgs; -import io.luckypray.dexkit.descriptor.member.DexMethodDescriptor; -import io.luckypray.dexkit.enums.MatchType; -import java.io.File; import java.lang.reflect.Method; import java.util.List; -import java.util.Map; import java.util.Objects; +import de.robv.android.xposed.XC_MethodReplacement; +import de.robv.android.xposed.XposedBridge; +import io.luckypray.dexkit.descriptor.member.DexMethodDescriptor; + public class BeautyFace extends BaseHook { static Method beautyFace; diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/securitycenter/beauty/BeautyLight.java b/app/src/main/java/com/sevtinge/cemiuiler/module/securitycenter/beauty/BeautyLight.java index 17e3527745..ae12daee7b 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/securitycenter/beauty/BeautyLight.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/securitycenter/beauty/BeautyLight.java @@ -1,22 +1,18 @@ package com.sevtinge.cemiuiler.module.securitycenter.beauty; +import static com.sevtinge.cemiuiler.utils.Helpers.getPackageVersionCode; + import com.sevtinge.cemiuiler.module.base.BaseHook; + import de.robv.android.xposed.XC_MethodHook; import de.robv.android.xposed.XC_MethodReplacement; -import de.robv.android.xposed.XposedBridge; -import de.robv.android.xposed.XposedHelpers; -import de.robv.android.xposed.callbacks.XC_LoadPackage; - -import java.io.File; - -import static com.sevtinge.cemiuiler.utils.Helpers.getPackageVersionCode; public class BeautyLight extends BaseHook { @Override public void init() { int appVersionCode = getPackageVersionCode(lpparam); if (appVersionCode == 40000749 || appVersionCode == 40000750) { - //hookAllMethods("p5.f", "m", XC_MethodReplacement.returnConstant(true)); + // hookAllMethods("p5.f", "m", XC_MethodReplacement.returnConstant(true)); hookAllMethods("p5.f", "G", XC_MethodReplacement.returnConstant(true)); } else if (appVersionCode == 40000754 || (appVersionCode >= 40000771 && appVersionCode <= 40000779 && appVersionCode != 40000772 && appVersionCode != 40000774 && appVersionCode != 40000777)) { findAndHookMethod("com.miui.gamebooster.beauty.l", "j", new BaseHook.MethodHook() { diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/securitycenter/beauty/BeautyLightAuto.java b/app/src/main/java/com/sevtinge/cemiuiler/module/securitycenter/beauty/BeautyLightAuto.java index a8a5766a77..1cded144a0 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/securitycenter/beauty/BeautyLightAuto.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/securitycenter/beauty/BeautyLightAuto.java @@ -2,22 +2,15 @@ import com.sevtinge.cemiuiler.module.base.BaseHook; import com.sevtinge.cemiuiler.module.securitycenter.SecurityCenterDexKit; -import de.robv.android.xposed.XC_MethodHook; -import de.robv.android.xposed.XC_MethodReplacement; -import de.robv.android.xposed.XposedBridge; -import de.robv.android.xposed.XposedHelpers; -import de.robv.android.xposed.callbacks.XC_LoadPackage; -import io.luckypray.dexkit.DexKitBridge; -import io.luckypray.dexkit.builder.BatchFindArgs; -import io.luckypray.dexkit.descriptor.member.DexMethodDescriptor; -import io.luckypray.dexkit.enums.MatchType; -import java.io.File; import java.lang.reflect.Method; import java.util.List; -import java.util.Map; import java.util.Objects; +import de.robv.android.xposed.XC_MethodReplacement; +import de.robv.android.xposed.XposedBridge; +import io.luckypray.dexkit.descriptor.member.DexMethodDescriptor; + public class BeautyLightAuto extends BaseHook { @Override public void init() { diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/securitycenter/beauty/BeautyPc.java b/app/src/main/java/com/sevtinge/cemiuiler/module/securitycenter/beauty/BeautyPc.java index 607ab4caac..c8f3596227 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/securitycenter/beauty/BeautyPc.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/securitycenter/beauty/BeautyPc.java @@ -2,22 +2,15 @@ import com.sevtinge.cemiuiler.module.base.BaseHook; import com.sevtinge.cemiuiler.module.securitycenter.SecurityCenterDexKit; -import de.robv.android.xposed.XC_MethodHook; -import de.robv.android.xposed.XC_MethodReplacement; -import de.robv.android.xposed.XposedBridge; -import de.robv.android.xposed.XposedHelpers; -import de.robv.android.xposed.callbacks.XC_LoadPackage; -import io.luckypray.dexkit.DexKitBridge; -import io.luckypray.dexkit.builder.BatchFindArgs; -import io.luckypray.dexkit.descriptor.member.DexMethodDescriptor; -import io.luckypray.dexkit.enums.MatchType; -import java.io.File; import java.lang.reflect.Method; import java.util.List; -import java.util.Map; import java.util.Objects; +import de.robv.android.xposed.XC_MethodReplacement; +import de.robv.android.xposed.XposedBridge; +import io.luckypray.dexkit.descriptor.member.DexMethodDescriptor; + public class BeautyPc extends BaseHook { @Override public void init() { diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/securitycenter/beauty/BeautyPrivacy.java b/app/src/main/java/com/sevtinge/cemiuiler/module/securitycenter/beauty/BeautyPrivacy.java index 36da9543c5..62ce870e20 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/securitycenter/beauty/BeautyPrivacy.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/securitycenter/beauty/BeautyPrivacy.java @@ -1,14 +1,10 @@ package com.sevtinge.cemiuiler.module.securitycenter.beauty; -import com.sevtinge.cemiuiler.module.base.BaseHook; -import de.robv.android.xposed.XC_MethodHook; -import de.robv.android.xposed.XposedBridge; -import de.robv.android.xposed.XposedHelpers; -import de.robv.android.xposed.callbacks.XC_LoadPackage; +import static com.sevtinge.cemiuiler.utils.Helpers.getPackageVersionCode; -import java.io.File; +import com.sevtinge.cemiuiler.module.base.BaseHook; -import static com.sevtinge.cemiuiler.utils.Helpers.getPackageVersionCode; +import de.robv.android.xposed.XC_MethodHook; public class BeautyPrivacy extends BaseHook { @Override diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/securitycenter/lab/AiClipboardEnable.java b/app/src/main/java/com/sevtinge/cemiuiler/module/securitycenter/lab/AiClipboardEnable.java index 3bfc4b70b3..fd2317c8a2 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/securitycenter/lab/AiClipboardEnable.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/securitycenter/lab/AiClipboardEnable.java @@ -3,16 +3,12 @@ import com.sevtinge.cemiuiler.module.base.BaseHook; import com.sevtinge.cemiuiler.module.securitycenter.SecurityCenterDexKit; import com.sevtinge.cemiuiler.utils.Helpers; -import de.robv.android.xposed.XC_MethodReplacement; -import de.robv.android.xposed.XposedBridge; -import io.luckypray.dexkit.descriptor.member.DexClassDescriptor; -import io.luckypray.dexkit.descriptor.member.DexMethodDescriptor; import java.util.List; import java.util.Map; import java.util.Objects; -import static com.sevtinge.cemiuiler.utils.Helpers.getPackageVersionCode; +import io.luckypray.dexkit.descriptor.member.DexClassDescriptor; public class AiClipboardEnable extends BaseHook { @@ -37,7 +33,7 @@ protected void before(MethodHookParam param) throws Throwable { try { Map featMap = (Map) fm; featMap.put("mi_lab_ai_clipboard_enable", 0); - //featMap.put("mi_lab_blur_location_enable", 0); + // featMap.put("mi_lab_blur_location_enable", 0); } catch (Throwable ignore) { } } diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/securitycenter/lab/BlurLocationEnable.java b/app/src/main/java/com/sevtinge/cemiuiler/module/securitycenter/lab/BlurLocationEnable.java index 938a67daf3..81db26acbc 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/securitycenter/lab/BlurLocationEnable.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/securitycenter/lab/BlurLocationEnable.java @@ -1,22 +1,14 @@ package com.sevtinge.cemiuiler.module.securitycenter.lab; -import android.content.ComponentName; import com.sevtinge.cemiuiler.module.base.BaseHook; import com.sevtinge.cemiuiler.module.securitycenter.SecurityCenterDexKit; import com.sevtinge.cemiuiler.utils.Helpers; -import de.robv.android.xposed.XC_MethodHook; -import de.robv.android.xposed.XposedBridge; -import de.robv.android.xposed.XposedHelpers; -import de.robv.android.xposed.callbacks.XC_LoadPackage; -import de.robv.android.xposed.callbacks.XCallback; -import io.luckypray.dexkit.descriptor.member.DexClassDescriptor; -import java.io.File; import java.util.List; import java.util.Map; import java.util.Objects; -import static com.sevtinge.cemiuiler.utils.Helpers.getPackageVersionCode; +import io.luckypray.dexkit.descriptor.member.DexClassDescriptor; public class BlurLocationEnable extends BaseHook { @@ -41,7 +33,7 @@ protected void before(MethodHookParam param) throws Throwable { try { Map featMap = (Map) fm; featMap.put("mi_lab_blur_location_enable", 0); - //featMap.put("mi_lab_blur_location_enable", 0); + // featMap.put("mi_lab_blur_location_enable", 0); } catch (Throwable ignore) { } } @@ -87,7 +79,7 @@ protected void before(MethodHookParam param) throws Throwable { */ - //findAndHookMethod(mStableVer, "IS_STABLE_VERSION", new MethodHook() { + // findAndHookMethod(mStableVer, "IS_STABLE_VERSION", new MethodHook() { // @Override // protected void before(MethodHookParam param) throws Throwable { // param.setResult(true); diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/securitycenter/lab/GetNumberEnable.java b/app/src/main/java/com/sevtinge/cemiuiler/module/securitycenter/lab/GetNumberEnable.java index 8a21ac2ebd..345abcbfbf 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/securitycenter/lab/GetNumberEnable.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/securitycenter/lab/GetNumberEnable.java @@ -3,17 +3,12 @@ import com.sevtinge.cemiuiler.module.base.BaseHook; import com.sevtinge.cemiuiler.module.securitycenter.SecurityCenterDexKit; import com.sevtinge.cemiuiler.utils.Helpers; -import de.robv.android.xposed.XposedBridge; -import de.robv.android.xposed.XposedHelpers; -import de.robv.android.xposed.callbacks.XC_LoadPackage; -import io.luckypray.dexkit.descriptor.member.DexClassDescriptor; -import java.io.File; import java.util.List; import java.util.Map; import java.util.Objects; -import static com.sevtinge.cemiuiler.utils.Helpers.getPackageVersionCode; +import io.luckypray.dexkit.descriptor.member.DexClassDescriptor; public class GetNumberEnable extends BaseHook { @@ -36,7 +31,7 @@ protected void before(MethodHookParam param) throws Throwable { try { Map featMap = (Map) fm; featMap.put("mi_lab_operator_get_number_enable", 0); - //featMap.put("mi_lab_blur_location_enable", 0); + // featMap.put("mi_lab_blur_location_enable", 0); } catch (Throwable ignore) { } } @@ -53,7 +48,7 @@ protected void before(MethodHookParam param) throws Throwable { param.setResult(false); } });*/ - //findAndHookMethod(mStableVer, "IS_STABLE_VERSION", new MethodHook() { + // findAndHookMethod(mStableVer, "IS_STABLE_VERSION", new MethodHook() { // @Override // protected void before(MethodHookParam param) throws Throwable { // param.setResult(true); diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/settings/CemiuilerSettings.java b/app/src/main/java/com/sevtinge/cemiuiler/module/settings/CemiuilerSettings.java index 94a14a9030..6b9d38583c 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/settings/CemiuilerSettings.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/settings/CemiuilerSettings.java @@ -25,7 +25,7 @@ public class CemiuilerSettings extends BaseHook { private Class mPreferenceHeader; - int mIconModeInt = mPrefsMap.getStringAsInt("prefs_key_settings_icon_mode",0); + int mIconModeInt = mPrefsMap.getStringAsInt("prefs_key_settings_icon_mode", 0); @Override public void init() { @@ -39,7 +39,7 @@ public void init() { protected void after(MethodHookParam param) throws Throwable { if (param.args[0] == null) return; - Context mContext = ((Activity)param.thisObject).getBaseContext(); + Context mContext = ((Activity) param.thisObject).getBaseContext(); int opt = Integer.parseInt(mPrefsMap.getString("settings_icon", "0")); if (opt == 0) return; @@ -59,7 +59,7 @@ protected void after(MethodHookParam param) throws Throwable { Bundle bundle = new Bundle(); ArrayList users = new ArrayList<>(); - users.add((UserHandle)XposedHelpers.newInstance(UserHandle.class, 0)); + users.add((UserHandle) XposedHelpers.newInstance(UserHandle.class, 0)); bundle.putParcelableArrayList("header_user", users); XposedHelpers.setObjectField(header, "extras", bundle); @@ -67,9 +67,9 @@ protected void after(MethodHookParam param) throws Throwable { int special = mContext.getResources().getIdentifier("other_special_feature_settings", "id", mContext.getPackageName()); int timer = mContext.getResources().getIdentifier("app_timer", "id", mContext.getPackageName()); - List headers = (List)param.args[0]; + List headers = (List) param.args[0]; int position = 0; - for (Object head: headers) { + for (Object head : headers) { position++; long id = XposedHelpers.getLongField(head, "id"); if (opt == 1 && id == -1) { diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/settings/NotificationImportance.java b/app/src/main/java/com/sevtinge/cemiuiler/module/settings/NotificationImportance.java index 9e9908899a..24887881ed 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/settings/NotificationImportance.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/settings/NotificationImportance.java @@ -9,7 +9,6 @@ import java.lang.reflect.Proxy; import de.robv.android.xposed.XposedHelpers; -import moralnorm.preference.Preference; public class NotificationImportance extends BaseHook { @@ -40,9 +39,9 @@ protected void before(MethodHookParam param) throws Throwable { protected void after(MethodHookParam param) throws Throwable { Object pref = XposedHelpers.callMethod(param.thisObject, "findPreference", "importance"); XposedHelpers.setObjectField(param.thisObject, "mImportance", pref); - int mBackupImportance = (int)XposedHelpers.getObjectField(param.thisObject, "mBackupImportance"); + int mBackupImportance = (int) XposedHelpers.getObjectField(param.thisObject, "mBackupImportance"); if (mBackupImportance > 0) { - int index = (int)XposedHelpers.callMethod(pref, "findSpinnerIndexOfValue", String.valueOf(mBackupImportance)); + int index = (int) XposedHelpers.callMethod(pref, "findSpinnerIndexOfValue", String.valueOf(mBackupImportance)); if (index > -1) { XposedHelpers.callMethod(pref, "setValueIndex", index); } @@ -66,9 +65,9 @@ public Object invoke(Object proxy, Method method, Object[] args) throws Throwabl } }; Object mImportanceListener = Proxy.newProxyInstance( - lpparam.classLoader, - new Class[] { ImportanceListener }, - handler + lpparam.classLoader, + new Class[]{ImportanceListener}, + handler ); XposedHelpers.callMethod(pref, "setOnPreferenceChangeListener", mImportanceListener); } diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/settings/VolumeSeparateControlForSettings.java b/app/src/main/java/com/sevtinge/cemiuiler/module/settings/VolumeSeparateControlForSettings.java index 9485dda30e..dbffe4afc3 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/settings/VolumeSeparateControlForSettings.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/settings/VolumeSeparateControlForSettings.java @@ -53,7 +53,7 @@ protected void after(MethodHookParam param) throws Throwable { } Method[] methods = XposedHelpers.findMethodsByExactParameters(mPreferenceGroupCls, void.class, mPreferenceCls); - for (Method method: methods) { + for (Method method : methods) { if (Modifier.isPublic(method.getModifiers())) { addPreference = method.getName(); break; diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/systemframework/AllowUninstall.java b/app/src/main/java/com/sevtinge/cemiuiler/module/systemframework/AllowUninstall.java index 062594648a..857c8df27c 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/systemframework/AllowUninstall.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/systemframework/AllowUninstall.java @@ -1,7 +1,11 @@ package com.sevtinge.cemiuiler.module.systemframework; import dalvik.system.PathClassLoader; -import de.robv.android.xposed.*; +import de.robv.android.xposed.IXposedHookZygoteInit; +import de.robv.android.xposed.XC_MethodHook; +import de.robv.android.xposed.XC_MethodReplacement; +import de.robv.android.xposed.XposedBridge; +import de.robv.android.xposed.XposedHelpers; public class AllowUninstall implements IXposedHookZygoteInit { @@ -17,39 +21,39 @@ public class AllowUninstall implements IXposedHookZygoteInit { public void initZygote(StartupParam startupParam) { XposedBridge.log("Cemiuiler: hook all PathClassLoader Constructors"); pathClassLoaderHook = - XposedBridge.hookAllConstructors(PathClassLoader.class, new XC_MethodHook() { - @Override - protected void afterHookedMethod(MethodHookParam param) { - String path = param.args[0].toString(); - if (path.contains("/system/framework/services.jar")) { - XposedBridge.log("Cemiuiler: find services.jar ClassLoader"); - try { - servicesClassLoader = (PathClassLoader) param.thisObject; - SecurityManagerServiceClazz = XposedHelpers.findClass( - SecurityManagerServiceName, - servicesClassLoader); - XposedBridge.log("Cemiuiler: findClass SecurityManagerService$1"); - XposedHelpers.findAndHookMethod(SecurityManagerServiceClazz, - "run", new XC_MethodReplacement() { - @Override - protected Object replaceHookedMethod(MethodHookParam unused) { - XposedBridge.log("Cemiuiler: hooked checkSystemSelfProtection invoke"); - return null; - } - }); - XposedBridge.log("Cemiuiler: hook method 'SecurityManagerService$1.run()'"); - } catch (Exception e) { - XposedBridge.log("Cemiuiler: AllowUninstall Exception!"); - e.printStackTrace(); - } finally { - for (Unhook hook : pathClassLoaderHook) { - hook.unhook(); - } - XposedBridge.log("Cemiuiler: unhook all PathClassLoader Constructors"); + XposedBridge.hookAllConstructors(PathClassLoader.class, new XC_MethodHook() { + @Override + protected void afterHookedMethod(MethodHookParam param) { + String path = param.args[0].toString(); + if (path.contains("/system/framework/services.jar")) { + XposedBridge.log("Cemiuiler: find services.jar ClassLoader"); + try { + servicesClassLoader = (PathClassLoader) param.thisObject; + SecurityManagerServiceClazz = XposedHelpers.findClass( + SecurityManagerServiceName, + servicesClassLoader); + XposedBridge.log("Cemiuiler: findClass SecurityManagerService$1"); + XposedHelpers.findAndHookMethod(SecurityManagerServiceClazz, + "run", new XC_MethodReplacement() { + @Override + protected Object replaceHookedMethod(MethodHookParam unused) { + XposedBridge.log("Cemiuiler: hooked checkSystemSelfProtection invoke"); + return null; + } + }); + XposedBridge.log("Cemiuiler: hook method 'SecurityManagerService$1.run()'"); + } catch (Exception e) { + XposedBridge.log("Cemiuiler: AllowUninstall Exception!"); + e.printStackTrace(); + } finally { + for (Unhook hook : pathClassLoaderHook) { + hook.unhook(); } + XposedBridge.log("Cemiuiler: unhook all PathClassLoader Constructors"); } } - }); + } + }); } diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/systemframework/AllowUntrustedTouch.java b/app/src/main/java/com/sevtinge/cemiuiler/module/systemframework/AllowUntrustedTouch.java index 0c92427507..dc28168d4a 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/systemframework/AllowUntrustedTouch.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/systemframework/AllowUntrustedTouch.java @@ -11,6 +11,6 @@ public class AllowUntrustedTouch extends BaseHook { @Override public void init() { mInputManager = findClassIfExists("android.hardware.input.InputManager"); - hookAllMethods(mInputManager, "getBlockUntrustedTouchesMode", XC_MethodReplacement.returnConstant(0));//error + hookAllMethods(mInputManager, "getBlockUntrustedTouchesMode", XC_MethodReplacement.returnConstant(0));// error } } diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/systemframework/AppDisableService.java b/app/src/main/java/com/sevtinge/cemiuiler/module/systemframework/AppDisableService.java index 8fb27f6c69..8dfc23d074 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/systemframework/AppDisableService.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/systemframework/AppDisableService.java @@ -8,8 +8,8 @@ public class AppDisableService extends BaseHook { public ArrayList mMiuiCoreApps = new ArrayList<>(Arrays.asList( - "com.lbe.security.miui", - "com.miui.securitycenter" + "com.lbe.security.miui", + "com.miui.securitycenter" )); @Override diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/systemframework/AppLinkVerify.java b/app/src/main/java/com/sevtinge/cemiuiler/module/systemframework/AppLinkVerify.java index ef75d70da6..2371c13554 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/systemframework/AppLinkVerify.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/systemframework/AppLinkVerify.java @@ -1,13 +1,6 @@ package com.sevtinge.cemiuiler.module.systemframework; -import android.content.Intent; - import com.sevtinge.cemiuiler.module.base.BaseHook; -import de.robv.android.xposed.IXposedHookLoadPackage; -import de.robv.android.xposed.XC_MethodHook; -import de.robv.android.xposed.XposedBridge; -import de.robv.android.xposed.XposedHelpers; -import de.robv.android.xposed.callbacks.XC_LoadPackage; public class AppLinkVerify extends BaseHook { @@ -15,11 +8,11 @@ public class AppLinkVerify extends BaseHook { public void init() { try { hookAllMethods("com.android.server.pm.verify.domain.DomainVerificationUtils", "isDomainVerificationIntent", new MethodHook() { - @Override - protected void before(MethodHookParam param) { - param.setResult(false); - } + @Override + protected void before(MethodHookParam param) { + param.setResult(false); } + } ); } catch (Throwable t) { logE(t); diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/systemframework/BackgroundBlurDrawable.kt b/app/src/main/java/com/sevtinge/cemiuiler/module/systemframework/BackgroundBlurDrawable.kt index 800c9e9276..d15cae82f7 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/systemframework/BackgroundBlurDrawable.kt +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/systemframework/BackgroundBlurDrawable.kt @@ -6,7 +6,7 @@ import de.robv.android.xposed.IXposedHookZygoteInit import de.robv.android.xposed.XC_MethodHook import de.robv.android.xposed.XposedBridge -class BackgroundBlurDrawable :IXposedHookZygoteInit { +class BackgroundBlurDrawable : IXposedHookZygoteInit { override fun initZygote(startupParam: IXposedHookZygoteInit.StartupParam) { val classLoader = startupParam.javaClass.classLoader val mBackgroundBlurDrawableClass = classLoader?.let { @@ -30,4 +30,4 @@ class BackgroundBlurDrawable :IXposedHookZygoteInit { } }) } -} \ No newline at end of file +} diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/systemframework/CleanOpenMenu.java b/app/src/main/java/com/sevtinge/cemiuiler/module/systemframework/CleanOpenMenu.java index ed93cd61cd..2b55fcb179 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/systemframework/CleanOpenMenu.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/systemframework/CleanOpenMenu.java @@ -9,16 +9,18 @@ import android.os.Handler; import android.util.Pair; import android.view.View; + import com.sevtinge.cemiuiler.module.base.BaseHook; import com.sevtinge.cemiuiler.utils.Helpers; import com.sevtinge.cemiuiler.utils.PrefsUtils; -import de.robv.android.xposed.XposedBridge; -import de.robv.android.xposed.XposedHelpers; import java.util.Iterator; import java.util.List; import java.util.Set; +import de.robv.android.xposed.XposedBridge; +import de.robv.android.xposed.XposedHelpers; + public class CleanOpenMenu extends BaseHook { Class mPackageManagerService; @@ -68,7 +70,7 @@ protected void after(MethodHookParam param) throws Throwable { Intent origIntent = (Intent) param.args[0]; Intent intent = (Intent) origIntent.clone(); String action = intent.getAction(); - //XposedBridge.log(action + ": " + intent.getType() + " | " + intent.getDataString()); + // XposedBridge.log(action + ": " + intent.getType() + " | " + intent.getDataString()); if (!Intent.ACTION_VIEW.equals(action)) return; if (intent.hasExtra("Cemiuiler") && intent.getBooleanExtra("Cemiuiler", false)) return; String scheme = intent.getScheme(); @@ -77,7 +79,7 @@ protected void after(MethodHookParam param) throws Throwable { Context mContext = (Context) XposedHelpers.getObjectField(param.thisObject, "mContext"); String mimeType = getContentType(mContext, intent); - //XposedBridge.log("mimeType: " + mimeType); + // XposedBridge.log("mimeType: " + mimeType); String key = "system_framework_clean_open_apps"; Set selectedApps = mPrefsMap.getStringSet(key); @@ -106,15 +108,15 @@ protected void after(MethodHookParam param) throws Throwable { String ActQueryService = Helpers.isAndroidVersionTiramisu() ? "com.android.server.pm.ComputerEngine" : "com.android.server.pm.PackageManagerService$ComputerEngine"; Helpers.hookAllMethods(ActQueryService, lpparam.classLoader, "queryIntentActivitiesInternal", hook); - //if (!findAndHookMethodSilently(mPackageManagerService, "queryIntentActivitiesInternal", Intent.class, String.class, int.class, int.class, int.class, boolean.class, boolean.class, hook)) + // if (!findAndHookMethodSilently(mPackageManagerService, "queryIntentActivitiesInternal", Intent.class, String.class, int.class, int.class, int.class, boolean.class, boolean.class, hook)) // findAndHookMethod(mPackageManagerService, "queryIntentActivitiesInternal", Intent.class, String.class, int.class, int.class, hook);//error } - //if (!findAndHookMethodSilently(mPackageManagerService, "queryIntentActivitiesInternal", Intent.class, String.class, long.class, long.class, int.class, boolean.class, boolean.class, hook)) - //findAndHookMethod(mPackageManagerService, "queryIntentActivitiesInternal", Intent.class, String.class, long.class, int.class, hook); + // if (!findAndHookMethodSilently(mPackageManagerService, "queryIntentActivitiesInternal", Intent.class, String.class, long.class, long.class, int.class, boolean.class, boolean.class, hook)) + // findAndHookMethod(mPackageManagerService, "queryIntentActivitiesInternal", Intent.class, String.class, long.class, int.class, hook); //} - //存在问题 + // 存在问题 private static Pair isRemoveApp(boolean dynamic, Context context, String pkgName, Set selectedApps, String mimeType) { String key = "system_framework_clean_open_apps"; int mimeFlags0; @@ -150,23 +152,23 @@ private static boolean hideMimeType(int mimeFlags, String mimeType) { else if (mimeType.startsWith("audio/")) dataType = Helpers.MimeType.AUDIO; else if (mimeType.startsWith("video/")) dataType = Helpers.MimeType.VIDEO; else if (mimeType.startsWith("text/") || - mimeType.startsWith("application/pdf") || - mimeType.startsWith("application/msword") || - mimeType.startsWith("application/vnd.ms-") || - mimeType.startsWith("application/vnd.openxmlformats-")) dataType = Helpers.MimeType.DOCUMENT; + mimeType.startsWith("application/pdf") || + mimeType.startsWith("application/msword") || + mimeType.startsWith("application/vnd.ms-") || + mimeType.startsWith("application/vnd.openxmlformats-")) dataType = Helpers.MimeType.DOCUMENT; else if (mimeType.startsWith("application/vnd.android.package-archive") || - mimeType.startsWith("application/zip") || - mimeType.startsWith("application/x-zip") || - mimeType.startsWith("application/octet-stream") || - mimeType.startsWith("application/rar") || - mimeType.startsWith("application/x-rar") || - mimeType.startsWith("application/x-tar") || - mimeType.startsWith("application/x-bzip") || - mimeType.startsWith("application/gzip") || - mimeType.startsWith("application/x-lz") || - mimeType.startsWith("application/x-compress") || - mimeType.startsWith("application/x-7z") || - mimeType.startsWith("application/java-archive")) dataType = Helpers.MimeType.ARCHIVE; + mimeType.startsWith("application/zip") || + mimeType.startsWith("application/x-zip") || + mimeType.startsWith("application/octet-stream") || + mimeType.startsWith("application/rar") || + mimeType.startsWith("application/x-rar") || + mimeType.startsWith("application/x-tar") || + mimeType.startsWith("application/x-bzip") || + mimeType.startsWith("application/gzip") || + mimeType.startsWith("application/x-lz") || + mimeType.startsWith("application/x-compress") || + mimeType.startsWith("application/x-7z") || + mimeType.startsWith("application/java-archive")) dataType = Helpers.MimeType.ARCHIVE; else if (mimeType.startsWith("link/")) dataType = Helpers.MimeType.LINK; return (mimeFlags & dataType) == dataType; } @@ -175,20 +177,20 @@ public static void initRes() { Helpers.hookAllMethods("miui.securityspace.XSpaceResolverActivityHelper.ResolverActivityRunner", null, "run", new Helpers.MethodHook() { @Override protected void after(MethodHookParam param) throws Throwable { - Intent mOriginalIntent = (Intent)XposedHelpers.getObjectField(param.thisObject, "mOriginalIntent"); + Intent mOriginalIntent = (Intent) XposedHelpers.getObjectField(param.thisObject, "mOriginalIntent"); if (mOriginalIntent == null) return; String action = mOriginalIntent.getAction(); if (!Intent.ACTION_VIEW.equals(action)) return; - //if (mOriginalIntent.getDataString() != null && mOriginalIntent.getDataString().contains(":")) return; + // if (mOriginalIntent.getDataString() != null && mOriginalIntent.getDataString().contains(":")) return; - Context mContext = (Context)XposedHelpers.getObjectField(param.thisObject, "mContext"); - String mAimPackageName = (String)XposedHelpers.getObjectField(param.thisObject, "mAimPackageName"); + Context mContext = (Context) XposedHelpers.getObjectField(param.thisObject, "mContext"); + String mAimPackageName = (String) XposedHelpers.getObjectField(param.thisObject, "mAimPackageName"); if (mContext == null || mAimPackageName == null) return; Set selectedApps = Helpers.getSharedStringSetPref(mContext, "system_framework_clean_open_apps"); String mimeType = getContentType(mContext, mOriginalIntent); Pair isRemove = isRemoveApp(true, mContext, mAimPackageName, selectedApps, mimeType); - View mRootView = (View)XposedHelpers.getObjectField(param.thisObject, "mRootView"); + View mRootView = (View) XposedHelpers.getObjectField(param.thisObject, "mRootView"); int appResId1 = mContext.getResources().getIdentifier("app1", "id", "android.miui"); int appResId2 = mContext.getResources().getIdentifier("app2", "id", "android.miui"); View originalApp = mRootView.findViewById(appResId1); diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/systemframework/CleanShareMenu.java b/app/src/main/java/com/sevtinge/cemiuiler/module/systemframework/CleanShareMenu.java index 584253f9be..9fd0aa3cca 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/systemframework/CleanShareMenu.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/systemframework/CleanShareMenu.java @@ -16,7 +16,6 @@ import java.util.List; import java.util.Set; -import de.robv.android.xposed.XposedBridge; import de.robv.android.xposed.XposedHelpers; public class CleanShareMenu extends BaseHook { @@ -84,11 +83,11 @@ protected void after(MethodHookParam param) throws Throwable { String ActQueryService = Helpers.isAndroidVersionTiramisu() ? "com.android.server.pm.ComputerEngine" : "com.android.server.pm.PackageManagerService$ComputerEngine"; Helpers.hookAllMethods(ActQueryService, lpparam.classLoader, "queryIntentActivitiesInternal", hook); - //if (!findAndHookMethodSilently(mPackageManagerService, "queryIntentActivitiesInternal", Intent.class, String.class, int.class, int.class, int.class, boolean.class, boolean.class, hook)) - // findAndHookMethod(mPackageManagerService, "queryIntentActivitiesInternal", Intent.class, String.class, int.class, int.class, hook);//error - } - //if (!findAndHookMethodSilently(mPackageManagerService, "queryIntentActivitiesInternal", Intent.class, String.class, long.class, long.class, int.class, boolean.class, boolean.class, hook)) - //findAndHookMethod(mPackageManagerService, "queryIntentActivitiesInternal", Intent.class, String.class, long.class, int.class, hook); + // if (!findAndHookMethodSilently(mPackageManagerService, "queryIntentActivitiesInternal", Intent.class, String.class, int.class, int.class, int.class, boolean.class, boolean.class, hook)) + // findAndHookMethod(mPackageManagerService, "queryIntentActivitiesInternal", Intent.class, String.class, int.class, int.class, hook);//error + } + // if (!findAndHookMethodSilently(mPackageManagerService, "queryIntentActivitiesInternal", Intent.class, String.class, long.class, long.class, int.class, boolean.class, boolean.class, hook)) + // findAndHookMethod(mPackageManagerService, "queryIntentActivitiesInternal", Intent.class, String.class, long.class, int.class, hook); //} public static void initRes() { diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/systemframework/DisableCleaner.kt b/app/src/main/java/com/sevtinge/cemiuiler/module/systemframework/DisableCleaner.kt index 8907cf581b..2671ce012f 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/systemframework/DisableCleaner.kt +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/systemframework/DisableCleaner.kt @@ -5,22 +5,46 @@ import com.sevtinge.cemiuiler.module.base.BaseHook object DisableCleaner : BaseHook() { override fun init() { hookAllMethods("com.android.server.am.ActivityManagerService", "checkExcessivePowerUsage", - object : MethodHook() { override fun before(param: MethodHookParam?) { param?.result = null }} + object : MethodHook() { + override fun before(param: MethodHookParam?) { + param?.result = null + } + } ) hookAllMethods("com.android.server.am.OomAdjuster", "shouldKillExcessiveProcesses", - object : MethodHook() { override fun before(param: MethodHookParam?) { param?.result = false }} + object : MethodHook() { + override fun before(param: MethodHookParam?) { + param?.result = false + } + } ) hookAllMethods("com.android.server.am.PhantomProcessList", "trimPhantomProcessesIfNecessary", - object : MethodHook() { override fun before(param: MethodHookParam?) { param?.result = null }} + object : MethodHook() { + override fun before(param: MethodHookParam?) { + param?.result = null + } + } ) hookAllMethods("com.android.server.am.ProcessMemoryCleaner", "checkBackgroundProcCompact", - object : MethodHook() { override fun before(param: MethodHookParam?) { param?.result = null }} + object : MethodHook() { + override fun before(param: MethodHookParam?) { + param?.result = null + } + } ) hookAllMethods("com.android.server.am.SystemPressureController", "nStartPressureMonitor", - object : MethodHook() { override fun before(param: MethodHookParam?) { param?.result = null }} + object : MethodHook() { + override fun before(param: MethodHookParam?) { + param?.result = null + } + } ) hookAllMethods("com.android.server.wm.RecentTasks", "trimInactiveRecentTasks", - object : MethodHook() { override fun before(param: MethodHookParam?) { param?.result = null }} + object : MethodHook() { + override fun before(param: MethodHookParam?) { + param?.result = null + } + } ) } } diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/systemframework/DisableFreeformBlackList.java b/app/src/main/java/com/sevtinge/cemiuiler/module/systemframework/DisableFreeformBlackList.java index 8f2e27c191..4d5ef7a63b 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/systemframework/DisableFreeformBlackList.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/systemframework/DisableFreeformBlackList.java @@ -24,13 +24,13 @@ public void init() { MethodHook clearHook = new MethodHook() { @Override protected void after(MethodHookParam param) throws Throwable { - List blackList = (List)param.getResult(); + List blackList = (List) param.getResult(); if (blackList != null) blackList.clear(); param.setResult(blackList); } }; - hookAllMethods(mMiuiMultiWindowAdapter,"getFreeformBlackList", clearHook); - hookAllMethods(mMiuiMultiWindowAdapter,"getFreeformBlackListFromCloud", clearHook); + hookAllMethods(mMiuiMultiWindowAdapter, "getFreeformBlackList", clearHook); + hookAllMethods(mMiuiMultiWindowAdapter, "getFreeformBlackListFromCloud", clearHook); hookAllMethods(mMiuiMultiWindowAdapter, "setFreeformBlackList", new MethodHook() { @Override protected void before(MethodHookParam param) throws Throwable { @@ -43,7 +43,7 @@ protected void before(MethodHookParam param) throws Throwable { findAndHookMethod(mMiuiMultiWindowUtils, "isForceResizeable", XC_MethodReplacement.returnConstant(true)); findAndHookMethod(mMiuiMultiWindowUtils, "supportFreeform", XC_MethodReplacement.returnConstant(true)); - //强制所有活动设为可以调整大小 + // 强制所有活动设为可以调整大小 /*findAndHookMethod(mTaskCls, "isResizeable", XC_MethodReplacement.returnConstant(true));*/ mResHook.setResReplacement("android", "array", "freeform_black_list", R.array.miui_freeform_black_list); diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/systemframework/FlagSecure.java b/app/src/main/java/com/sevtinge/cemiuiler/module/systemframework/FlagSecure.java index 018e5c8387..730b395577 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/systemframework/FlagSecure.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/systemframework/FlagSecure.java @@ -1,23 +1,18 @@ package com.sevtinge.cemiuiler.module.systemframework; -import com.sevtinge.cemiuiler.module.base.BaseHook; - -import de.robv.android.xposed.XC_MethodReplacement; - import android.os.Build; import android.util.Log; +import com.sevtinge.cemiuiler.module.base.BaseHook; + import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Member; import java.lang.reflect.Method; import java.util.function.BiPredicate; -import de.robv.android.xposed.IXposedHookLoadPackage; import de.robv.android.xposed.XC_MethodReplacement; import de.robv.android.xposed.XposedBridge; import de.robv.android.xposed.XposedHelpers; -import de.robv.android.xposed.callbacks.XC_LoadPackage; -import de.robv.android.xposed.callbacks.XC_LoadPackage.LoadPackageParam; public class FlagSecure extends BaseHook { @@ -54,16 +49,16 @@ public void init() { Class windowsState = XposedHelpers.findClass("com.android.server.wm.WindowState", lpparam.classLoader); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) { XposedHelpers.findAndHookMethod( - windowsState, - "isSecureLocked", - XC_MethodReplacement.returnConstant(false)); + windowsState, + "isSecureLocked", + XC_MethodReplacement.returnConstant(false)); } else { XposedHelpers.findAndHookMethod( - "com.android.server.wm.WindowManagerService", - lpparam.classLoader, - "isSecureLocked", - windowsState, - XC_MethodReplacement.returnConstant(false)); + "com.android.server.wm.WindowManagerService", + lpparam.classLoader, + "isSecureLocked", + windowsState, + XC_MethodReplacement.returnConstant(false)); } } catch (Throwable t) { XposedBridge.log(t); diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/systemframework/IsDetailLog.java b/app/src/main/java/com/sevtinge/cemiuiler/module/systemframework/IsDetailLog.java index 6202d3a6f0..041997904a 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/systemframework/IsDetailLog.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/systemframework/IsDetailLog.java @@ -1,11 +1,13 @@ package com.sevtinge.cemiuiler.module.systemframework; import com.sevtinge.cemiuiler.module.base.BaseHook; + import de.robv.android.xposed.XposedBridge; public class IsDetailLog extends BaseHook { @Override public void init() { - if (mPrefsMap.getBoolean("settings_disable_detailed_log")) XposedBridge.log("Cemiuiler: Detail log is disabled."); + if (mPrefsMap.getBoolean("settings_disable_detailed_log")) + XposedBridge.log("Cemiuiler: Detail log is disabled."); } } diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/systemframework/MultiFreeFormSupported.kt b/app/src/main/java/com/sevtinge/cemiuiler/module/systemframework/MultiFreeFormSupported.kt index 06321896a4..ebba6c40a1 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/systemframework/MultiFreeFormSupported.kt +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/systemframework/MultiFreeFormSupported.kt @@ -27,11 +27,11 @@ object MultiFreeFormSupported : BaseHook() { } log("Hook with recents_to_small_freeform success!") } else { - loadClass("android.util.MiuiMultiWindowUtils").methodFinder().first { + loadClass("android.util.MiuiMultiWindowUtils").methodFinder().first { name == "multiFreeFormSupported" }.createHook { - returnConstant(true) - } + returnConstant(true) + } log("Hook success!") } } catch (e: Throwable) { @@ -39,4 +39,4 @@ object MultiFreeFormSupported : BaseHook() { } } -} \ No newline at end of file +} diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/systemframework/PackagePermissions.java b/app/src/main/java/com/sevtinge/cemiuiler/module/systemframework/PackagePermissions.java index f7df737a1c..0473978c61 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/systemframework/PackagePermissions.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/systemframework/PackagePermissions.java @@ -6,12 +6,12 @@ import com.sevtinge.cemiuiler.module.base.BaseHook; import com.sevtinge.cemiuiler.utils.Helpers; import com.sevtinge.cemiuiler.utils.LogUtils; +import com.sevtinge.cemiuiler.utils.SdkHelper; import java.util.ArrayList; import java.util.Arrays; import java.util.List; -import com.sevtinge.cemiuiler.utils.SdkHelper; import de.robv.android.xposed.XposedHelpers; public class PackagePermissions extends BaseHook { @@ -28,7 +28,7 @@ public void init() { hookAllMethods(PMSCls, "shouldGrantPermissionBySignature", new MethodHook() { @Override protected void before(MethodHookParam param) { - String pkgName = (String)XposedHelpers.callMethod(param.args[0], "getPackageName"); + String pkgName = (String) XposedHelpers.callMethod(param.args[0], "getPackageName"); if (systemPackages.contains(pkgName)) param.setResult(true); } }); @@ -37,7 +37,7 @@ protected void before(MethodHookParam param) { hookAllMethodsSilently("com.android.server.pm.PackageManagerServiceUtils", "verifySignatures", new MethodHook() { @Override protected void before(MethodHookParam param) { - String pkgName = (String)XposedHelpers.callMethod(param.args[0], "getName"); + String pkgName = (String) XposedHelpers.callMethod(param.args[0], "getName"); if (systemPackages.contains(pkgName)) param.setResult(true); } }); @@ -45,12 +45,12 @@ protected void before(MethodHookParam param) { // Make module appear as system app String ActQueryService = SdkHelper.isAndroidTiramisu() ? "com.android.server.pm.ComputerEngine" : "com.android.server.pm.PackageManagerService"; - hookAllMethods(ActQueryService, "queryIntentActivitiesInternal", new MethodHook() { + hookAllMethods(ActQueryService, "queryIntentActivitiesInternal", new MethodHook() { @Override @SuppressWarnings("unchecked") protected void after(MethodHookParam param) { if (param.args.length < 6) return; - List infos = (List)param.getResult(); + List infos = (List) param.getResult(); if (infos != null) { for (ResolveInfo info : infos) { if (info != null && info.activityInfo != null && systemPackages.contains(info.activityInfo.packageName)) { @@ -59,7 +59,7 @@ protected void after(MethodHookParam param) { } } } - }); + }); findAndHookMethod("android.content.pm.ApplicationInfo", "isSystemApp", new MethodHook() { @Override @@ -83,7 +83,7 @@ protected void after(MethodHookParam param) { try { Class dpgpiClass = findClass("com.android.server.pm.MiuiDefaultPermissionGrantPolicy"); - String[] MIUI_SYSTEM_APPS = (String[])XposedHelpers.getStaticObjectField(dpgpiClass, "MIUI_SYSTEM_APPS"); + String[] MIUI_SYSTEM_APPS = (String[]) XposedHelpers.getStaticObjectField(dpgpiClass, "MIUI_SYSTEM_APPS"); ArrayList mySystemApps = new ArrayList<>(Arrays.asList(MIUI_SYSTEM_APPS)); mySystemApps.addAll(systemPackages); XposedHelpers.setStaticObjectField(dpgpiClass, "MIUI_SYSTEM_APPS", mySystemApps.toArray(new String[0])); diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/systemframework/RemoveSmallWindowRestrictions.kt b/app/src/main/java/com/sevtinge/cemiuiler/module/systemframework/RemoveSmallWindowRestrictions.kt index 0ca08b7e60..5fcd71cb34 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/systemframework/RemoveSmallWindowRestrictions.kt +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/systemframework/RemoveSmallWindowRestrictions.kt @@ -33,7 +33,7 @@ object RemoveSmallWindowRestrictions : BaseHook() { after { param -> val this0 = param.thisObject.javaClass.getField("this\$0").get(param.thisObject) val mAtmService = this0.javaClass.getField("mAtmService").get(this0) - mAtmService.javaClass.getField("mDevEnableNonResizableMultiWindow").setBoolean(mAtmService,true) + mAtmService.javaClass.getField("mDevEnableNonResizableMultiWindow").setBoolean(mAtmService, true) } } } catch (e: Throwable) { @@ -45,9 +45,9 @@ object RemoveSmallWindowRestrictions : BaseHook() { name == "onChange" }.toList().createHooks { after { param -> - val this0 = param.thisObject.javaClass.getField("this\$0").get(param.thisObject) - val mAtmService = this0.javaClass.getField("mAtmService").get(this0) - mAtmService.javaClass.getField("mDevEnableNonResizableMultiWindow").setBoolean(mAtmService,true) + val this0 = param.thisObject.javaClass.getField("this\$0").get(param.thisObject) + val mAtmService = this0.javaClass.getField("mAtmService").get(this0) + mAtmService.javaClass.getField("mDevEnableNonResizableMultiWindow").setBoolean(mAtmService, true) } } } catch (e: Throwable) { @@ -117,4 +117,4 @@ object RemoveSmallWindowRestrictions : BaseHook() { } -} \ No newline at end of file +} diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/systemframework/StickyFloatingWindows.java b/app/src/main/java/com/sevtinge/cemiuiler/module/systemframework/StickyFloatingWindows.java index 699d561d14..d3ee5cfee5 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/systemframework/StickyFloatingWindows.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/systemframework/StickyFloatingWindows.java @@ -35,17 +35,17 @@ public void init() { @Override protected void after(MethodHookParam param) throws Throwable { if (param.args.length != 8) return; - Intent intent = (Intent)param.args[5]; + Intent intent = (Intent) param.args[5]; if (intent == null || intent.getComponent() == null) return; - ActivityOptions options = (ActivityOptions)param.getResult(); + ActivityOptions options = (ActivityOptions) param.getResult(); int windowingMode = options == null ? -1 : (int) XposedHelpers.callMethod(options, "getLaunchWindowingMode"); String pkgName = intent.getComponent().getPackageName(); if (fwBlackList.contains(pkgName)) return; Context mContext; try { - mContext = (Context)XposedHelpers.getObjectField(param.args[0], "mContext"); + mContext = (Context) XposedHelpers.getObjectField(param.args[0], "mContext"); } catch (Throwable ignore) { - mContext = (Context)XposedHelpers.getObjectField(XposedHelpers.getObjectField(param.args[0], "mService"), "mContext"); + mContext = (Context) XposedHelpers.getObjectField(XposedHelpers.getObjectField(param.args[0], "mService"), "mContext"); } if (windowingMode != 5 && fwApps.containsKey(pkgName)) { try { @@ -58,8 +58,7 @@ protected void after(MethodHookParam param) throws Throwable { } catch (Throwable t) { LogUtils.log(TAG, t); } - } - else if (windowingMode == 5 && !fwApps.containsKey(pkgName)) { + } else if (windowingMode == 5 && !fwApps.containsKey(pkgName)) { fwApps.put(pkgName, new Pair(0f, null)); storeFwAppsInSetting(mContext); } @@ -70,25 +69,26 @@ else if (windowingMode == 5 && !fwApps.containsKey(pkgName)) { @Override protected void after(MethodHookParam param) throws Throwable { Object safeOptions = param.args[3]; - ActivityOptions options = (ActivityOptions)XposedHelpers.callMethod(safeOptions, "getOptions", param.thisObject); - int windowingMode = options == null ? -1 : (int)XposedHelpers.callMethod(options, "getLaunchWindowingMode"); - String pkgName = getTaskPackageName(param.thisObject, (int)param.args[2], options); + ActivityOptions options = (ActivityOptions) XposedHelpers.callMethod(safeOptions, "getOptions", param.thisObject); + int windowingMode = options == null ? -1 : (int) XposedHelpers.callMethod(options, "getLaunchWindowingMode"); + String pkgName = getTaskPackageName(param.thisObject, (int) param.args[2], options); if (fwBlackList.contains(pkgName)) return; if (windowingMode == 5 && pkgName != null) { fwApps.put(pkgName, new Pair(0f, null)); - Context mContext = (Context)XposedHelpers.getObjectField(XposedHelpers.getObjectField(param.thisObject, "mService"), "mContext"); + Context mContext = (Context) XposedHelpers.getObjectField(XposedHelpers.getObjectField(param.thisObject, "mService"), "mContext"); storeFwAppsInSetting(mContext); } } + @Override protected void before(MethodHookParam param) throws Throwable { Object safeOptions = param.args[3]; - ActivityOptions options = (ActivityOptions)XposedHelpers.callMethod(safeOptions, "getOptions", param.thisObject); - int windowingMode = options == null ? -1 : (int)XposedHelpers.callMethod(options, "getLaunchWindowingMode"); - String pkgName = getTaskPackageName(param.thisObject, (int)param.args[2], options); + ActivityOptions options = (ActivityOptions) XposedHelpers.callMethod(safeOptions, "getOptions", param.thisObject); + int windowingMode = options == null ? -1 : (int) XposedHelpers.callMethod(options, "getLaunchWindowingMode"); + String pkgName = getTaskPackageName(param.thisObject, (int) param.args[2], options); if (fwBlackList.contains(pkgName)) return; if (windowingMode != 5 && fwApps.containsKey(pkgName)) { - Context mContext = (Context)XposedHelpers.getObjectField(XposedHelpers.getObjectField(param.thisObject, "mService"), "mContext"); + Context mContext = (Context) XposedHelpers.getObjectField(XposedHelpers.getObjectField(param.thisObject, "mService"), "mContext"); options = patchActivityOptions(mContext, options, pkgName, MiuiMultiWindowUtils); XposedHelpers.setObjectField(safeOptions, "mOriginalOptions", options); param.args[3] = safeOptions; @@ -115,7 +115,7 @@ protected void before(MethodHookParam param) throws Throwable { @Override protected void before(MethodHookParam param) throws Throwable { if (param.args.length != 3) return; - String pkgName = (String)XposedHelpers.callMethod(param.args[1], "getStackPackageName"); + String pkgName = (String) XposedHelpers.callMethod(param.args[1], "getStackPackageName"); Object skipClear = XposedHelpers.getAdditionalInstanceField(param.thisObject, "skipFreeFormStateClear"); boolean skipFreeFormStateClear = false; if (skipClear != null) { @@ -124,10 +124,9 @@ protected void before(MethodHookParam param) throws Throwable { if (!skipFreeFormStateClear) { if (fwBlackList.contains(pkgName)) return; if (fwApps.remove(pkgName) != null) { - storeFwAppsInSetting((Context)XposedHelpers.getObjectField(XposedHelpers.getObjectField(param.thisObject, "mService"), "mContext")); + storeFwAppsInSetting((Context) XposedHelpers.getObjectField(XposedHelpers.getObjectField(param.thisObject, "mService"), "mContext")); } - } - else { + } else { XposedHelpers.setAdditionalInstanceField(param.thisObject, "skipFreeFormStateClear", false); } } @@ -143,7 +142,7 @@ protected void after(MethodHookParam param) throws Throwable { if (fwBlackList.contains(pkgName)) return; if (!fwApps.containsKey(pkgName)) { fwApps.put(pkgName, new Pair(0f, null)); - Context mContext = (Context)XposedHelpers.getObjectField(param.thisObject, "mContext"); + Context mContext = (Context) XposedHelpers.getObjectField(param.thisObject, "mContext"); storeFwAppsInSetting(mContext); } } @@ -152,7 +151,7 @@ protected void after(MethodHookParam param) throws Throwable { findAndHookMethod("com.android.server.wm.ActivityTaskManagerService", "onSystemReady", new MethodHook() { @Override protected void after(MethodHookParam param) throws Throwable { - Context mContext = (Context)XposedHelpers.getObjectField(param.thisObject, "mContext"); + Context mContext = (Context) XposedHelpers.getObjectField(param.thisObject, "mContext"); restoreFwAppsInSetting(mContext); Class MiuiMultiWindowAdapter = findClass("android.util.MiuiMultiWindowAdapter", lpparam.classLoader); List blackList = (List) XposedHelpers.getStaticObjectField(MiuiMultiWindowAdapter, "FREEFORM_BLACK_LIST"); @@ -172,7 +171,7 @@ public void onReceive(Context context, Intent intent) { hookAllMethods("com.android.server.wm.ActivityTaskManagerService", "resizeTask", new MethodHook() { @Override protected void before(MethodHookParam param) throws Throwable { - String pkgName = getTaskPackageName(param.thisObject, (int)param.args[0]); + String pkgName = getTaskPackageName(param.thisObject, (int) param.args[0]); if (pkgName != null) { Object skipClear = XposedHelpers.getAdditionalInstanceField(param.thisObject, "skipFreeFormStateClear"); boolean skipFreeFormStateClear = false; @@ -181,15 +180,14 @@ protected void before(MethodHookParam param) throws Throwable { } if (skipFreeFormStateClear) { XposedHelpers.setAdditionalInstanceField(param.thisObject, "skipFreeFormStateClear", false); - } - else { + } else { if (fwBlackList.contains(pkgName)) return; Object mMiuiFreeFormManagerService = XposedHelpers.getObjectField(param.thisObject, "mMiuiFreeFormManagerService"); Object miuiFreeFormActivityStack = XposedHelpers.callMethod(mMiuiFreeFormManagerService, "getMiuiFreeFormActivityStack", param.args[0]); if (fwApps.containsKey(pkgName)) { - Context mContext = (Context)XposedHelpers.getObjectField(param.thisObject, "mContext"); + Context mContext = (Context) XposedHelpers.getObjectField(param.thisObject, "mContext"); float sScale = (float) XposedHelpers.callMethod(miuiFreeFormActivityStack, "getFreeFormScale"); - fwApps.put(pkgName, new Pair(sScale, new Rect((Rect)param.args[1]))); + fwApps.put(pkgName, new Pair(sScale, new Rect((Rect) param.args[1]))); storeFwAppsInSetting(mContext); } } @@ -199,7 +197,6 @@ protected void before(MethodHookParam param) throws Throwable { } - public static String getTaskPackageName(Object thisObject, int taskId) { return getTaskPackageName(thisObject, taskId, false, null); } @@ -212,16 +209,16 @@ public static String getTaskPackageName(Object thisObject, int taskId, boolean w Object mRootWindowContainer = XposedHelpers.getObjectField(thisObject, "mRootWindowContainer"); if (mRootWindowContainer == null) return null; Object task = withOptions ? - XposedHelpers.callMethod(mRootWindowContainer, "anyTaskForId", taskId, 2, options, true) : - XposedHelpers.callMethod(mRootWindowContainer, "anyTaskForId", taskId, 0); + XposedHelpers.callMethod(mRootWindowContainer, "anyTaskForId", taskId, 2, options, true) : + XposedHelpers.callMethod(mRootWindowContainer, "anyTaskForId", taskId, 0); if (task == null) return null; - Intent intent = (Intent)XposedHelpers.getObjectField(task, "intent"); + Intent intent = (Intent) XposedHelpers.getObjectField(task, "intent"); return intent == null ? null : intent.getComponent().getPackageName(); } public static String serializeFwApps() { StringBuilder data = new StringBuilder(); - for (Map.Entry> entry: fwApps.entrySet()) { + for (Map.Entry> entry : fwApps.entrySet()) { Pair val = entry.getValue(); data.append(entry.getKey()); data.append(":"); @@ -237,7 +234,7 @@ public static void unserializeFwApps(String data) { fwApps.clear(); if (data == null || "".equals(data)) return; String[] dataArr = data.split("\\|"); - for (String appData: dataArr) { + for (String appData : dataArr) { if ("".equals(appData)) continue; String[] appDataArr = appData.split(":"); fwApps.put(appDataArr[0], new Pair(Float.parseFloat(appDataArr[1]), "-".equals(appDataArr[2]) ? null : Rect.unflattenFromString(appDataArr[2]))); @@ -251,6 +248,7 @@ public static void storeFwAppsInSetting(Context context) { public static void restoreFwAppsInSetting(Context context) { unserializeFwApps(Settings.Global.getString(context.getContentResolver(), Helpers.mAppModulePkg + ".fw.apps")); } + private static ActivityOptions patchActivityOptions(Context mContext, ActivityOptions options, String pkgName, Class MiuiMultiWindowUtils) { if (options == null) options = ActivityOptions.makeBasic(); XposedHelpers.callMethod(options, "setLaunchWindowingMode", 5); @@ -261,7 +259,7 @@ private static ActivityOptions patchActivityOptions(Context mContext, ActivityOp Pair values = fwApps.get(pkgName); if (values == null || values.first == 0f || values.second == null) { scale = 0.7f; - rect = (Rect)XposedHelpers.callStaticMethod(MiuiMultiWindowUtils, "getFreeformRect", mContext); + rect = (Rect) XposedHelpers.callStaticMethod(MiuiMultiWindowUtils, "getFreeformRect", mContext); } else { scale = values.first; rect = values.second; diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/systemframework/VolumeDisableSafe.java b/app/src/main/java/com/sevtinge/cemiuiler/module/systemframework/VolumeDisableSafe.java index 90ee2c6efd..2083719ae2 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/systemframework/VolumeDisableSafe.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/systemframework/VolumeDisableSafe.java @@ -1,6 +1,7 @@ package com.sevtinge.cemiuiler.module.systemframework; import com.sevtinge.cemiuiler.module.base.BaseHook; + import de.robv.android.xposed.XC_MethodReplacement; public class VolumeDisableSafe extends BaseHook { diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/systemframework/VolumeFirstPress.java b/app/src/main/java/com/sevtinge/cemiuiler/module/systemframework/VolumeFirstPress.java index 00acccda2d..b3233f9939 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/systemframework/VolumeFirstPress.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/systemframework/VolumeFirstPress.java @@ -17,9 +17,9 @@ public void init() { findAndHookMethod(mVolumeController, "suppressAdjustment", int.class, int.class, boolean.class, new MethodHook() { @Override protected void after(MethodHookParam param) throws Throwable { - int streamType = (int)param.args[0]; + int streamType = (int) param.args[0]; if (streamType != AudioManager.STREAM_MUSIC) return; - boolean isMuteAdjust = (boolean)param.args[2]; + boolean isMuteAdjust = (boolean) param.args[2]; if (isMuteAdjust) return; Object mController = XposedHelpers.getObjectField(param.thisObject, "mController"); if (mController == null) return; diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/systemframework/VolumeMediaSteps.kt b/app/src/main/java/com/sevtinge/cemiuiler/module/systemframework/VolumeMediaSteps.kt index b64c32b64d..93d122b2a3 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/systemframework/VolumeMediaSteps.kt +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/systemframework/VolumeMediaSteps.kt @@ -5,9 +5,9 @@ import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHook import com.github.kyuubiran.ezxhelper.finders.MethodFinder.`-Static`.methodFinder import com.sevtinge.cemiuiler.module.base.BaseHook -class VolumeMediaSteps : BaseHook(){ +class VolumeMediaSteps : BaseHook() { override fun init() { - val mediaStepsSwitch = mPrefsMap.getInt("system_framework_volume_media_steps",15)>15 + val mediaStepsSwitch = mPrefsMap.getInt("system_framework_volume_media_steps", 15) > 15 val mediaSteps = mPrefsMap.getInt("system_framework_volume_media_steps", 15) loadClass("android.os.SystemProperties").methodFinder().first { @@ -21,4 +21,4 @@ class VolumeMediaSteps : BaseHook(){ } } -} \ No newline at end of file +} diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/systemframework/VolumeSeparateControl.java b/app/src/main/java/com/sevtinge/cemiuiler/module/systemframework/VolumeSeparateControl.java index 368593aca5..f1ce23b7fe 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/systemframework/VolumeSeparateControl.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/systemframework/VolumeSeparateControl.java @@ -1,16 +1,14 @@ package com.sevtinge.cemiuiler.module.systemframework; -import android.os.Build; import android.provider.Settings; import android.util.SparseIntArray; import com.sevtinge.cemiuiler.module.base.BaseHook; +import com.sevtinge.cemiuiler.utils.SdkHelper; import java.util.Set; -import com.sevtinge.cemiuiler.utils.SdkHelper; import de.robv.android.xposed.XposedHelpers; -import moralnorm.os.SdkVersion; public class VolumeSeparateControl extends BaseHook { @@ -68,9 +66,9 @@ protected void before(MethodHookParam param) throws Throwable { findAndHookMethodSilently(mAudioService, "shouldZenMuteStream", int.class, new MethodHook() { protected void after(MethodHookParam param) throws Throwable { - int mStreamType = (int)param.args[0]; - if (mStreamType == 5 && !(boolean)param.getResult()) { - int mZenMode = (int)XposedHelpers.callMethod(XposedHelpers.getObjectField(param.thisObject, "mNm"), "getZenMode"); + int mStreamType = (int) param.args[0]; + if (mStreamType == 5 && !(boolean) param.getResult()) { + int mZenMode = (int) XposedHelpers.callMethod(XposedHelpers.getObjectField(param.thisObject, "mNm"), "getZenMode"); if (mZenMode == 1) param.setResult(true); } } diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/systemframework/VolumeSteps.java b/app/src/main/java/com/sevtinge/cemiuiler/module/systemframework/VolumeSteps.java index d121aa7152..6682938d78 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/systemframework/VolumeSteps.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/systemframework/VolumeSteps.java @@ -11,13 +11,13 @@ public class VolumeSteps extends BaseHook { @Override public void init() { - mAudioService = findClass("com.android.server.audio.AudioService"); + mAudioService = findClass("com.android.server.audio.AudioService"); findAndHookMethod(mAudioService, "createStreamStates", new MethodHook() { @Override protected void before(MethodHookParam param) { - int[] maxStreamVolume = (int[])XposedHelpers.getStaticObjectField(mAudioService, "MAX_STREAM_VOLUME"); + int[] maxStreamVolume = (int[]) XposedHelpers.getStaticObjectField(mAudioService, "MAX_STREAM_VOLUME"); int mult = mPrefsMap.getInt("system_framework_volume_steps", 0); if (mult <= 0) return; for (int i = 0; i < maxStreamVolume.length; i++) diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/systemframework/corepatch/BypassSignCheckForT.kt b/app/src/main/java/com/sevtinge/cemiuiler/module/systemframework/corepatch/BypassSignCheckForT.kt index c0321fd633..13f42512c9 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/systemframework/corepatch/BypassSignCheckForT.kt +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/systemframework/corepatch/BypassSignCheckForT.kt @@ -8,13 +8,13 @@ import com.sevtinge.cemiuiler.module.base.BaseHook object BypassSignCheckForT : BaseHook() { override fun init() { try { - loadClass("android.util.apk.ApkSignatureVerifier").methodFinder().first { + loadClass("android.util.apk.ApkSignatureVerifier").methodFinder().first { name == "getMinimumSignatureSchemeVersionForTargetSdk" - }.createHook { + }.createHook { after { param -> param.result = 1 } - } + } } catch (e: Throwable) { logE(e) } diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/systemframework/corepatch/CorePatchForR.java b/app/src/main/java/com/sevtinge/cemiuiler/module/systemframework/corepatch/CorePatchForR.java index d0f09234b6..232cae42d5 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/systemframework/corepatch/CorePatchForR.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/systemframework/corepatch/CorePatchForR.java @@ -45,33 +45,33 @@ public void handleLoadPackage(XC_LoadPackage.LoadPackageParam loadPackageParam) // 允许降级 findAndHookMethod("com.android.server.pm.PackageManagerService", loadPackageParam.classLoader, - "checkDowngrade", - "com.android.server.pm.parsing.pkg.AndroidPackage", - "android.content.pm.PackageInfoLite", - new ReturnConstant(prefs, "prefs_key_system_framework_core_patch_downgr", null)); + "checkDowngrade", + "com.android.server.pm.parsing.pkg.AndroidPackage", + "android.content.pm.PackageInfoLite", + new ReturnConstant(prefs, "prefs_key_system_framework_core_patch_downgr", null)); // apk内文件修改后 digest校验会失败 hookAllMethods("android.util.jar.StrictJarVerifier", loadPackageParam.classLoader, "verifyMessageDigest", - new ReturnConstant(prefs, "prefs_key_system_framework_core_patch_auth_creak", true)); + new ReturnConstant(prefs, "prefs_key_system_framework_core_patch_auth_creak", true)); hookAllMethods("android.util.jar.StrictJarVerifier", loadPackageParam.classLoader, "verify", - new ReturnConstant(prefs, "prefs_key_system_framework_core_patch_auth_creak", true)); + new ReturnConstant(prefs, "prefs_key_system_framework_core_patch_auth_creak", true)); hookAllMethods("java.security.MessageDigest", loadPackageParam.classLoader, "isEqual", - new ReturnConstant(prefs, "prefs_key_system_framework_core_patch_auth_creak", true)); + new ReturnConstant(prefs, "prefs_key_system_framework_core_patch_auth_creak", true)); // Targeting R+ (version " + Build.VERSION_CODES.R + " and above) requires" // + " the resources.arsc of installed APKs to be stored uncompressed" // + " and aligned on a 4-byte boundary // target >=30 的情况下 resources.arsc 必须是未压缩的且4K对齐 hookAllMethods("android.content.res.AssetManager", loadPackageParam.classLoader, "containsAllocatedTable", - new ReturnConstant(prefs, "prefs_key_system_framework_core_patch_auth_creak", false)); + new ReturnConstant(prefs, "prefs_key_system_framework_core_patch_auth_creak", false)); // No signature found in package of version " + minSignatureSchemeVersion // + " or newer for package " + apkPath findAndHookMethod("android.util.apk.ApkSignatureVerifier", loadPackageParam.classLoader, "getMinimumSignatureSchemeVersionForTargetSdk", int.class, - new ReturnConstant(prefs, "prefs_key_system_framework_core_patch_auth_creak", 0)); + new ReturnConstant(prefs, "prefs_key_system_framework_core_patch_auth_creak", 0)); findAndHookMethod("com.android.apksig.ApkVerifier", loadPackageParam.classLoader, "getMinimumSignatureSchemeVersionForTargetSdk", int.class, - new ReturnConstant(prefs, "prefs_key_system_framework_core_patch_auth_creak", 0)); + new ReturnConstant(prefs, "prefs_key_system_framework_core_patch_auth_creak", 0)); // Package " + packageName + " signatures do not match previously installed version; ignoring!" // public boolean checkCapability(String sha256String, @CertCapabilities int flags) { @@ -118,7 +118,7 @@ public void afterHookedMethod(MethodHookParam param) throws Throwable { Object info = infos[0]; List verifiedSignerCertChain = (List) XposedHelpers.callMethod(info, "getCertificateChain", block); param.setResult(verifiedSignerCertChain.toArray( - new X509Certificate[0])); + new X509Certificate[0])); } } } @@ -176,7 +176,7 @@ public void afterHookedMethod(MethodHookParam methodHookParam) throws Throwable } Object newInstance = findConstructorExact.newInstance(signingDetailsArgs); - //修复 java.lang.ClassCastException: Cannot cast android.content.pm.PackageParser$SigningDetails to android.util.apk.ApkSignatureVerifier$SigningDetailsWithDigests + // 修复 java.lang.ClassCastException: Cannot cast android.content.pm.PackageParser$SigningDetails to android.util.apk.ApkSignatureVerifier$SigningDetailsWithDigests Class signingDetailsWithDigests = XposedHelpers.findClassIfExists("android.util.apk.ApkSignatureVerifier.SigningDetailsWithDigests", loadPackageParam.classLoader); if (signingDetailsWithDigests != null) { Constructor signingDetailsWithDigestsConstructorExact = XposedHelpers.findConstructorExact(signingDetailsWithDigests, signingDetails, Map.class); @@ -207,8 +207,8 @@ public void afterHookedMethod(MethodHookParam methodHookParam) throws Throwable }); - //New package has a different signature - //处理覆盖安装但签名不一致 + // New package has a different signature + // 处理覆盖安装但签名不一致 hookAllMethods(signingDetails, "checkCapability", new XC_MethodHook() { @Override protected void beforeHookedMethod(MethodHookParam param) { @@ -228,7 +228,7 @@ protected void beforeHookedMethod(MethodHookParam param) throws Throwable { if (prefs.getBoolean("prefs_key_system_framework_core_patch_digest_creak", true)) { ApplicationInfo info = (ApplicationInfo) param.thisObject; if ((info.flags & ApplicationInfo.FLAG_SYSTEM) != 0 - || (info.flags & ApplicationInfo.FLAG_UPDATED_SYSTEM_APP) != 0) { + || (info.flags & ApplicationInfo.FLAG_UPDATED_SYSTEM_APP) != 0) { param.setResult(true); } } @@ -267,4 +267,4 @@ protected void beforeHookedMethod(MethodHookParam param) throws Throwable { } }); } -} \ No newline at end of file +} diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/systemframework/corepatch/CorePatchForS.java b/app/src/main/java/com/sevtinge/cemiuiler/module/systemframework/corepatch/CorePatchForS.java index 91ade19a2c..ec205bf2c9 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/systemframework/corepatch/CorePatchForS.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/systemframework/corepatch/CorePatchForS.java @@ -3,13 +3,9 @@ import java.lang.reflect.InvocationTargetException; import de.robv.android.xposed.XC_MethodHook; -import de.robv.android.xposed.XposedBridge; import de.robv.android.xposed.XposedHelpers; import de.robv.android.xposed.callbacks.XC_LoadPackage; -import static com.sevtinge.cemiuiler.module.base.BaseHook.mPrefsMap; -import static com.sevtinge.cemiuiler.utils.Helpers.log; - public class CorePatchForS extends CorePatchForR { @Override public void handleLoadPackage(XC_LoadPackage.LoadPackageParam loadPackageParam) throws IllegalAccessException, InvocationTargetException, InstantiationException { @@ -18,7 +14,7 @@ public void handleLoadPackage(XC_LoadPackage.LoadPackageParam loadPackageParam) findAndHookMethod("com.android.server.pm.PackageManagerService", loadPackageParam.classLoader, "doesSignatureMatchForPermissions", String.class, "com.android.server.pm.parsing.pkg.ParsedPackage", int.class, new XC_MethodHook() { @Override protected void afterHookedMethod(MethodHookParam param) throws Throwable { - //If we decide to crack this then at least make sure they are same apks, avoid another one that tries to impersonate. + // If we decide to crack this then at least make sure they are same apks, avoid another one that tries to impersonate. if (param.getResult().equals(false)) { String pPname = (String) XposedHelpers.callMethod(param.args[1], "getPackageName"); if (pPname.contentEquals((String) param.args[0])) { @@ -29,4 +25,4 @@ protected void afterHookedMethod(MethodHookParam param) throws Throwable { }); } } -} \ No newline at end of file +} diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/systemframework/corepatch/CorePatchForSv2.java b/app/src/main/java/com/sevtinge/cemiuiler/module/systemframework/corepatch/CorePatchForSv2.java index 608341c170..c8188000a7 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/systemframework/corepatch/CorePatchForSv2.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/systemframework/corepatch/CorePatchForSv2.java @@ -1,8 +1,4 @@ package com.sevtinge.cemiuiler.module.systemframework.corepatch; -import de.robv.android.xposed.callbacks.XC_LoadPackage; - -import java.lang.reflect.InvocationTargetException; - -public class CorePatchForSv2 extends CorePatchForS{ +public class CorePatchForSv2 extends CorePatchForS { } diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/systemframework/corepatch/CorePatchForT.java b/app/src/main/java/com/sevtinge/cemiuiler/module/systemframework/corepatch/CorePatchForT.java index a13362faf2..2ecb87075e 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/systemframework/corepatch/CorePatchForT.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/systemframework/corepatch/CorePatchForT.java @@ -2,12 +2,11 @@ import android.util.Log; -import de.robv.android.xposed.XC_MethodHook; -import de.robv.android.xposed.XposedHelpers; -import de.robv.android.xposed.XposedBridge; - import java.lang.reflect.InvocationTargetException; +import de.robv.android.xposed.XC_MethodHook; +import de.robv.android.xposed.XposedBridge; +import de.robv.android.xposed.XposedHelpers; import de.robv.android.xposed.callbacks.XC_LoadPackage; public class CorePatchForT extends CorePatchForSv2 { @@ -16,14 +15,14 @@ public void handleLoadPackage(XC_LoadPackage.LoadPackageParam loadPackageParam) super.handleLoadPackage(loadPackageParam); findAndHookMethod("com.android.server.pm.PackageManagerServiceUtils", loadPackageParam.classLoader, - "checkDowngrade", - "com.android.server.pm.parsing.pkg.AndroidPackage", - "android.content.pm.PackageInfoLite", - new ReturnConstant(prefs, "prefs_key_system_framework_core_patch_downgr", null)); + "checkDowngrade", + "com.android.server.pm.parsing.pkg.AndroidPackage", + "android.content.pm.PackageInfoLite", + new ReturnConstant(prefs, "prefs_key_system_framework_core_patch_downgr", null)); Class signingDetails = getSigningDetails(loadPackageParam.classLoader); - //New package has a different signature - //处理覆盖安装但签名不一致 + // New package has a different signature + // 处理覆盖安装但签名不一致 hookAllMethods(signingDetails, "checkCapability", new XC_MethodHook() { @Override protected void beforeHookedMethod(MethodHookParam param) { @@ -58,7 +57,7 @@ protected void beforeHookedMethod(MethodHookParam param) { findAndHookMethod("com.android.server.pm.InstallPackageHelper", loadPackageParam.classLoader, "doesSignatureMatchForPermissions", String.class, "com.android.server.pm.parsing.pkg.ParsedPackage", int.class, new XC_MethodHook() { @Override protected void afterHookedMethod(MethodHookParam param) { - //If we decide to crack this then at least make sure they are same apks, avoid another one that tries to impersonate. + // If we decide to crack this then at least make sure they are same apks, avoid another one that tries to impersonate. if (param.getResult().equals(false)) { String pPname = (String) XposedHelpers.callMethod(param.args[1], "getPackageName"); if (pPname.contentEquals((String) param.args[0])) { @@ -95,4 +94,4 @@ protected void afterHookedMethod(MethodHookParam param) { Class getSigningDetails(ClassLoader classLoader) { return XposedHelpers.findClassIfExists("android.content.pm.SigningDetails", classLoader); } -} \ No newline at end of file +} diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/systemsettings/AddMiuiPlusEntry.java b/app/src/main/java/com/sevtinge/cemiuiler/module/systemsettings/AddMiuiPlusEntry.java index 930d478aa0..6b9d839c90 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/systemsettings/AddMiuiPlusEntry.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/systemsettings/AddMiuiPlusEntry.java @@ -1,19 +1,20 @@ package com.sevtinge.cemiuiler.module.systemsettings; import com.sevtinge.cemiuiler.module.base.BaseHook; + import de.robv.android.xposed.XC_MethodHook; public class AddMiuiPlusEntry extends BaseHook { - @Override - public void init() { - findAndHookMethod("com.android.settings.connection.MiMirrorController", "isMirrorSupported", new BaseHook.MethodHook() { - @Override - protected void before(XC_MethodHook.MethodHookParam param) throws Throwable { - param.setResult(true); - } - }); - } + @Override + public void init() { + findAndHookMethod("com.android.settings.connection.MiMirrorController", "isMirrorSupported", new BaseHook.MethodHook() { + @Override + protected void before(XC_MethodHook.MethodHookParam param) throws Throwable { + param.setResult(true); + } + }); } +} diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/systemsettings/EnableSpeedMode.java b/app/src/main/java/com/sevtinge/cemiuiler/module/systemsettings/EnableSpeedMode.java index e7e74ce9f2..01bf7fd889 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/systemsettings/EnableSpeedMode.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/systemsettings/EnableSpeedMode.java @@ -3,15 +3,15 @@ import com.sevtinge.cemiuiler.module.base.BaseHook; public class EnableSpeedMode extends BaseHook { - @Override - public void init() { - findAndHookMethod("com.android.settings.development.SpeedModeToolsPreferenceController", "getAvailabilityStatus", new MethodHook() { - @Override - protected void before(MethodHookParam param) throws Throwable { - param.setResult(0); - } - }); + @Override + public void init() { + findAndHookMethod("com.android.settings.development.SpeedModeToolsPreferenceController", "getAvailabilityStatus", new MethodHook() { + @Override + protected void before(MethodHookParam param) throws Throwable { + param.setResult(0); + } + }); - } } +} diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/systemsettings/InternationalBuild.java b/app/src/main/java/com/sevtinge/cemiuiler/module/systemsettings/InternationalBuild.java index a289ceba3f..84a343eb4e 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/systemsettings/InternationalBuild.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/systemsettings/InternationalBuild.java @@ -1,7 +1,7 @@ package com.sevtinge.cemiuiler.module.systemsettings; -import android.os.Bundle; import com.sevtinge.cemiuiler.module.base.BaseHook; + import de.robv.android.xposed.XposedHelpers; import miui.os.Build; @@ -10,4 +10,4 @@ public class InternationalBuild extends BaseHook { public void init() { XposedHelpers.setStaticBooleanField(Build.class, "IS_INTERNATIONAL_BUILD", true); } -} \ No newline at end of file +} diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/systemsettings/PermissionTopOfApp.kt b/app/src/main/java/com/sevtinge/cemiuiler/module/systemsettings/PermissionTopOfApp.kt index 9ac0c383c8..38f14e3d83 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/systemsettings/PermissionTopOfApp.kt +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/systemsettings/PermissionTopOfApp.kt @@ -6,18 +6,20 @@ import android.content.Intent import android.os.Bundle import com.sevtinge.cemiuiler.module.base.BaseHook import de.robv.android.xposed.XC_MethodHook -import de.robv.android.xposed.XposedBridge import de.robv.android.xposed.XposedHelpers object PermissionTopOfApp : BaseHook() { override fun init() { if (lpparam.packageName == "com.android.settings") { - XposedHelpers.findAndHookMethod("com.android.settings.SettingsActivity", lpparam.classLoader, "onCreate", Bundle::class.java, + XposedHelpers.findAndHookMethod("com.android.settings.SettingsActivity", + lpparam.classLoader, + "onCreate", + Bundle::class.java, object : XC_MethodHook() { @Throws(Throwable::class) override fun beforeHookedMethod(param: MethodHookParam) { - //调试是否Hook成功 + // 调试是否Hook成功 super.beforeHookedMethod(param) log("onCreate has been done.") } @@ -32,9 +34,10 @@ object PermissionTopOfApp : BaseHook() { val intent = (getIntentMethod.invoke(thisObject) as Intent) log("settingsIntent: $intent") if (intent.action == "android.settings.action.MANAGE_OVERLAY_PERMISSION") { - //intent中的data Uri 示例: package:com.xxx.xxxxxxx ,故去掉前面的package就是应用包名 + // intent中的data Uri 示例: package:com.xxx.xxxxxxx ,故去掉前面的package就是应用包名 val packageName = intent.data.toString().substring(8) - val intentOpenSub = Intent(context, lpparam.classLoader.loadClass("com.android.settings.SubSettings")) + val intentOpenSub = + Intent(context, lpparam.classLoader.loadClass("com.android.settings.SubSettings")) intentOpenSub.action = "android.intent.action.MAIN" intentOpenSub.putExtra(":settings:source_metrics", 221) intentOpenSub.putExtra( diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/systemsettings/ViewWifiPasswordHook.java b/app/src/main/java/com/sevtinge/cemiuiler/module/systemsettings/ViewWifiPasswordHook.java index b2259cac78..34ed11a993 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/systemsettings/ViewWifiPasswordHook.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/systemsettings/ViewWifiPasswordHook.java @@ -18,7 +18,7 @@ public class ViewWifiPasswordHook extends BaseHook { @Override public void init() { int titleId = mResHook.addResource("system_wifipassword_btn_title", R.string.system_settings_wifipassword_btn_title); - int dlgTitleId =mResHook.addResource("system_wifi_password_dlgtitle", R.string.system_settings_wifi_password_dlgtitle); + int dlgTitleId = mResHook.addResource("system_wifi_password_dlgtitle", R.string.system_settings_wifi_password_dlgtitle); Helpers.hookAllMethods("com.android.settings.wifi.SavedAccessPointPreference", lpparam.classLoader, "onBindViewHolder", new MethodHook() { @Override @SuppressLint("DiscouragedApi") @@ -71,7 +71,7 @@ protected void before(MethodHookParam param) throws Throwable { } Object mWifiManager = XposedHelpers.getObjectField(param.thisObject, "mWifiManager"); Object wifiConfiguration = XposedHelpers.callMethod(wifiEntry, "getWifiConfiguration"); - Class WifiDppUtilsClass = XposedHelpers.findClass("com.android.settings.wifi.dpp.WifiDppUtils", lpparam.classLoader); + Class WifiDppUtilsClass = XposedHelpers.findClass("com.android.settings.wifi.dpp.WifiDppUtils", lpparam.classLoader); String sharedKey = (String) XposedHelpers.callStaticMethod(WifiDppUtilsClass, "getPresharedKey", mWifiManager, wifiConfiguration); sharedKey = (String) XposedHelpers.callStaticMethod(WifiDppUtilsClass, "removeFirstAndLastDoubleQuotes", sharedKey); wifiSharedKey[0] = sharedKey; diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/systemsettings/VoipAssistantController.java b/app/src/main/java/com/sevtinge/cemiuiler/module/systemsettings/VoipAssistantController.java index 628c223498..669201b0b2 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/systemsettings/VoipAssistantController.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/systemsettings/VoipAssistantController.java @@ -3,15 +3,15 @@ import com.sevtinge.cemiuiler.module.base.BaseHook; public class VoipAssistantController extends BaseHook { - @Override - public void init() { - findAndHookMethod("com.android.settings.lab.MiuiVoipAssistantController", "isNotSupported", new MethodHook() { - @Override - protected void before(MethodHookParam param) throws Throwable { - param.setResult(false); - } - }); + @Override + public void init() { + findAndHookMethod("com.android.settings.lab.MiuiVoipAssistantController", "isNotSupported", new MethodHook() { + @Override + protected void before(MethodHookParam param) throws Throwable { + param.setResult(false); + } + }); - } } +} diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/systemsettings/aiimage/UnlockAi.java b/app/src/main/java/com/sevtinge/cemiuiler/module/systemsettings/aiimage/UnlockAi.java index 5cd78480c3..97fc3de13b 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/systemsettings/aiimage/UnlockAi.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/systemsettings/aiimage/UnlockAi.java @@ -1,9 +1,10 @@ package com.sevtinge.cemiuiler.module.systemsettings.aiimage; import android.content.Context; + import com.sevtinge.cemiuiler.module.base.BaseHook; -public class UnlockAi extends BaseHook{ +public class UnlockAi extends BaseHook { @Override public void init() { findAndHookMethod("com.android.settings.display.ScreenEnhanceEngineStatusCheck", "isAiSupport", Context.class, new BaseHook.MethodHook() { diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/systemsettings/aiimage/UnlockMemc.java b/app/src/main/java/com/sevtinge/cemiuiler/module/systemsettings/aiimage/UnlockMemc.java index 33e380a728..a2a71fcac2 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/systemsettings/aiimage/UnlockMemc.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/systemsettings/aiimage/UnlockMemc.java @@ -1,6 +1,5 @@ package com.sevtinge.cemiuiler.module.systemsettings.aiimage; -import android.content.Context; import com.sevtinge.cemiuiler.module.base.BaseHook; public class UnlockMemc extends BaseHook { diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/BatteryIndicator.java b/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/BatteryIndicator.java index b311f5d696..ed973e3693 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/BatteryIndicator.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/BatteryIndicator.java @@ -20,7 +20,7 @@ public void init() { @Override protected void after(final MethodHookParam param) throws Throwable { Context mContext = (Context) XposedHelpers.getObjectField(param.thisObject, "mContext"); - FrameLayout mStatusBarWindow = (FrameLayout)XposedHelpers.getObjectField(param.thisObject, "mPhoneStatusBarWindow"); + FrameLayout mStatusBarWindow = (FrameLayout) XposedHelpers.getObjectField(param.thisObject, "mPhoneStatusBarWindow"); BatteryIndicatorView indicator = new BatteryIndicatorView(mContext); View panel = mStatusBarWindow.findViewById(mContext.getResources().getIdentifier("notification_panel", "id", lpparam.packageName)); mStatusBarWindow.addView(indicator, panel != null ? mStatusBarWindow.indexOfChild(panel) + 1 : Math.max(mStatusBarWindow.getChildCount() - 1, 2)); @@ -40,27 +40,27 @@ protected void after(final MethodHookParam param) throws Throwable { findAndHookMethod("com.android.systemui.statusbar.phone.StatusBar", "setPanelExpanded", boolean.class, new MethodHook() { @Override protected void after(final MethodHookParam param) throws Throwable { - boolean isKeyguardShowing = (boolean)XposedHelpers.callMethod(param.thisObject, "isKeyguardShowing"); - BatteryIndicatorView indicator = (BatteryIndicatorView)XposedHelpers.getAdditionalInstanceField(param.thisObject, "mBatteryIndicator"); - if (indicator != null) indicator.onExpandingChanged(!isKeyguardShowing && (boolean)param.args[0]); + boolean isKeyguardShowing = (boolean) XposedHelpers.callMethod(param.thisObject, "isKeyguardShowing"); + BatteryIndicatorView indicator = (BatteryIndicatorView) XposedHelpers.getAdditionalInstanceField(param.thisObject, "mBatteryIndicator"); + if (indicator != null) indicator.onExpandingChanged(!isKeyguardShowing && (boolean) param.args[0]); } }); findAndHookMethod("com.android.systemui.statusbar.phone.StatusBar", "setQsExpanded", boolean.class, new MethodHook() { @Override protected void after(final MethodHookParam param) throws Throwable { - boolean isKeyguardShowing = (boolean)XposedHelpers.callMethod(param.thisObject, "isKeyguardShowing"); + boolean isKeyguardShowing = (boolean) XposedHelpers.callMethod(param.thisObject, "isKeyguardShowing"); if (!isKeyguardShowing) return; - BatteryIndicatorView indicator = (BatteryIndicatorView)XposedHelpers.getAdditionalInstanceField(param.thisObject, "mBatteryIndicator"); - if (indicator != null) indicator.onExpandingChanged((boolean)param.args[0]); + BatteryIndicatorView indicator = (BatteryIndicatorView) XposedHelpers.getAdditionalInstanceField(param.thisObject, "mBatteryIndicator"); + if (indicator != null) indicator.onExpandingChanged((boolean) param.args[0]); } }); findAndHookMethod("com.android.systemui.statusbar.phone.StatusBar", "updateKeyguardState", new MethodHook() { @Override protected void after(final MethodHookParam param) throws Throwable { - boolean isKeyguardShowing = (boolean)XposedHelpers.callMethod(param.thisObject, "isKeyguardShowing"); - BatteryIndicatorView indicator = (BatteryIndicatorView)XposedHelpers.getAdditionalInstanceField(param.thisObject, "mBatteryIndicator"); + boolean isKeyguardShowing = (boolean) XposedHelpers.callMethod(param.thisObject, "isKeyguardShowing"); + BatteryIndicatorView indicator = (BatteryIndicatorView) XposedHelpers.getAdditionalInstanceField(param.thisObject, "mBatteryIndicator"); if (indicator != null) indicator.onKeyguardStateChanged(isKeyguardShowing); } }); @@ -68,15 +68,15 @@ protected void after(final MethodHookParam param) throws Throwable { findAndHookMethod("com.android.systemui.statusbar.phone.NotificationIconAreaController", "onDarkChanged", Rect.class, float.class, int.class, new MethodHook() { @Override protected void after(final MethodHookParam param) throws Throwable { - BatteryIndicatorView indicator = (BatteryIndicatorView)XposedHelpers.getAdditionalInstanceField(param.thisObject, "mBatteryIndicator"); - if (indicator != null) indicator.onDarkModeChanged((float)param.args[1], (int)param.args[2]); + BatteryIndicatorView indicator = (BatteryIndicatorView) XposedHelpers.getAdditionalInstanceField(param.thisObject, "mBatteryIndicator"); + if (indicator != null) indicator.onDarkModeChanged((float) param.args[1], (int) param.args[2]); } }); findAndHookMethod("com.android.systemui.statusbar.policy.MiuiBatteryControllerImpl", "fireBatteryLevelChanged", new MethodHook() { @Override protected void after(final MethodHookParam param) throws Throwable { - BatteryIndicatorView indicator = (BatteryIndicatorView)XposedHelpers.getAdditionalInstanceField(param.thisObject, "mBatteryIndicator"); + BatteryIndicatorView indicator = (BatteryIndicatorView) XposedHelpers.getAdditionalInstanceField(param.thisObject, "mBatteryIndicator"); int mLevel = XposedHelpers.getIntField(param.thisObject, "mLevel"); boolean mCharging = XposedHelpers.getBooleanField(param.thisObject, "mCharging"); boolean mCharged = XposedHelpers.getBooleanField(param.thisObject, "mCharged"); @@ -87,8 +87,9 @@ protected void after(final MethodHookParam param) throws Throwable { findAndHookMethod("com.android.systemui.statusbar.policy.BatteryControllerImpl", "firePowerSaveChanged", new MethodHook() { @Override protected void after(final MethodHookParam param) throws Throwable { - BatteryIndicatorView indicator = (BatteryIndicatorView)XposedHelpers.getAdditionalInstanceField(param.thisObject, "mBatteryIndicator"); - if (indicator != null) indicator.onPowerSaveChanged(XposedHelpers.getBooleanField(param.thisObject, "mPowerSave")); + BatteryIndicatorView indicator = (BatteryIndicatorView) XposedHelpers.getAdditionalInstanceField(param.thisObject, "mBatteryIndicator"); + if (indicator != null) + indicator.onPowerSaveChanged(XposedHelpers.getBooleanField(param.thisObject, "mPowerSave")); } }); } diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/BluetoothRestrict.java b/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/BluetoothRestrict.java index f0aa8848cd..6ae0c02b86 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/BluetoothRestrict.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/BluetoothRestrict.java @@ -15,8 +15,8 @@ public void init() { mLocalBluetoothAdapter = findClassIfExists("com.android.settingslib.bluetooth.LocalBluetoothAdapter"); findAndHookMethod(mLocalBluetoothAdapter, - "isSupportBluetoothRestrict", - Context.class, - XC_MethodReplacement.returnConstant(false)); + "isSupportBluetoothRestrict", + Context.class, + XC_MethodReplacement.returnConstant(false)); } } diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/ChargeAnimationStyle.java b/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/ChargeAnimationStyle.java index ebda0de837..89aac6fb44 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/ChargeAnimationStyle.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/ChargeAnimationStyle.java @@ -23,7 +23,7 @@ public void init() { mChargeAnimCls = findClassIfExists("com.android.keyguard.charge.ChargeUtils"); mWaveViewCls = findClassIfExists("com.android.keyguard.charge.wave.WaveView"); - mChargeAnimationType = mPrefsMap.getStringAsInt("system_ui_charge_animation_style",0); + mChargeAnimationType = mPrefsMap.getStringAsInt("system_ui_charge_animation_style", 0); setChargeAnimationType(mChargeAnimationType); } @@ -31,7 +31,7 @@ public void init() { public void setChargeAnimationType(int value) { if (value == 1) { - findAndHookMethod(mChargeAnimCls,"isChargeAnimationDisabled", new MethodHook() { + findAndHookMethod(mChargeAnimCls, "isChargeAnimationDisabled", new MethodHook() { @Override protected void after(MethodHookParam param) throws Throwable { param.setResult(true); @@ -45,7 +45,7 @@ protected void after(MethodHookParam param) throws Throwable { StackTraceElement[] stackElement = new Throwable().getStackTrace(); boolean mResult = false; Set classTrue = new ArraySet<>(new String[]{"com.android.keyguard.charge.ChargeUtils", - "com.android.keyguard.charge.container.MiuiChargeContainerView"}); + "com.android.keyguard.charge.container.MiuiChargeContainerView"}); int i = 0; int length = stackElement.length; @@ -91,7 +91,7 @@ protected void after(MethodHookParam param) throws Throwable { case 3 -> mType = 1; } - findAndHookMethod(mChargeAnimCls,"getChargeAnimationType", new MethodHook() { + findAndHookMethod(mChargeAnimCls, "getChargeAnimationType", new MethodHook() { @Override protected void before(MethodHookParam param) throws Throwable { param.setResult(mType); diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/ClockCenterHook.java b/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/ClockCenterHook.java index 519c7d2ec5..a327dde817 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/ClockCenterHook.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/ClockCenterHook.java @@ -29,10 +29,10 @@ public void init() { mStatusBarView = findClassIfExists("com.android.systemui.statusbar.phone.CollapsedStatusBarFragment"); - Helpers.findAndHookMethod(mStatusBarView,"onViewCreated", View.class, Bundle.class, new MethodHook() { + Helpers.findAndHookMethod(mStatusBarView, "onViewCreated", View.class, Bundle.class, new MethodHook() { @Override protected void after(MethodHookParam param) throws Throwable { - ViewGroup miuiPhoneStatusBarView = (ViewGroup) XposedHelpers.getObjectField(param.thisObject,"mStatusBar"); + ViewGroup miuiPhoneStatusBarView = (ViewGroup) XposedHelpers.getObjectField(param.thisObject, "mStatusBar"); Context context = miuiPhoneStatusBarView.getContext(); Resources res = miuiPhoneStatusBarView.getResources(); @@ -42,56 +42,55 @@ protected void after(MethodHookParam param) throws Throwable { int systemIconAreaId = res.getIdentifier("system_icon_area", "id", "com.android.systemui"); int clockId = res.getIdentifier("clock", "id", "com.android.systemui"); int phoneStatusBarLeftContainerId = - res.getIdentifier( - "phone_status_bar_left_container", - "id", - "com.android.systemui" - ); + res.getIdentifier( + "phone_status_bar_left_container", + "id", + "com.android.systemui" + ); int fullscreenNotificationIconAreaId = - res.getIdentifier( - "fullscreen_notification_icon_area", - "id", - "com.android.systemui" - ); + res.getIdentifier( + "fullscreen_notification_icon_area", + "id", + "com.android.systemui" + ); int statusIconsId = - res.getIdentifier( - "statusIcons", - "id", - "com.android.systemui" - ); + res.getIdentifier( + "statusIcons", + "id", + "com.android.systemui" + ); int systemIconsId = - res.getIdentifier( - "system_icons", - "id", - "com.android.systemui" - ); + res.getIdentifier( + "system_icons", + "id", + "com.android.systemui" + ); int batteryId = - res.getIdentifier( - "battery", - "id", - "com.android.systemui" - ); + res.getIdentifier( + "battery", + "id", + "com.android.systemui" + ); statusBar = miuiPhoneStatusBarView.findViewById(statusBarId); ViewGroup statusBarContents = miuiPhoneStatusBarView.findViewById(statusBarContentsId); - TextView clock = miuiPhoneStatusBarView.findViewById(clockId); ViewGroup phoneStatusBarLeftContainer = - miuiPhoneStatusBarView.findViewById(phoneStatusBarLeftContainerId); + miuiPhoneStatusBarView.findViewById(phoneStatusBarLeftContainerId); ViewGroup fullscreenNotificationIconArea = - miuiPhoneStatusBarView.findViewById(fullscreenNotificationIconAreaId); + miuiPhoneStatusBarView.findViewById(fullscreenNotificationIconAreaId); ViewGroup systemIconArea = - miuiPhoneStatusBarView.findViewById(systemIconAreaId); + miuiPhoneStatusBarView.findViewById(systemIconAreaId); ViewGroup statusIcons = - miuiPhoneStatusBarView.findViewById(statusIconsId); + miuiPhoneStatusBarView.findViewById(statusIconsId); ViewGroup systemIcons = - miuiPhoneStatusBarView.findViewById(systemIconsId); + miuiPhoneStatusBarView.findViewById(systemIconsId); ViewGroup battery = - miuiPhoneStatusBarView.findViewById(batteryId); + miuiPhoneStatusBarView.findViewById(batteryId); ((ViewGroup) clock.getParent()).removeView(clock); ((ViewGroup) phoneStatusBarLeftContainer).removeView(phoneStatusBarLeftContainer); @@ -101,7 +100,7 @@ protected void after(MethodHookParam param) throws Throwable { ((ViewGroup) systemIcons.getParent()).removeView(systemIcons); ((ViewGroup) battery.getParent()).removeView(battery); ((ViewGroup) fullscreenNotificationIconArea.getParent()).removeView( - fullscreenNotificationIconArea + fullscreenNotificationIconArea ); FrameLayout mConstraintLayout = new FrameLayout(context); @@ -120,22 +119,22 @@ protected void after(MethodHookParam param) throws Throwable { fullscreenNotificationIconArea.setLayoutDirection(View.LAYOUT_DIRECTION_RTL); - //增加一个左对齐布局 + // 增加一个左对齐布局 mLeftLayout = new LinearLayout(context); - LinearLayout.LayoutParams leftLp = new LinearLayout.LayoutParams(0, LinearLayout.LayoutParams.MATCH_PARENT,1.0f); + LinearLayout.LayoutParams leftLp = new LinearLayout.LayoutParams(0, LinearLayout.LayoutParams.MATCH_PARENT, 1.0f); mLeftLayout.setLayoutParams(leftLp); mLeftLayout.setGravity(Gravity.START | Gravity.CENTER_VERTICAL); - //增加一个居中布局 + // 增加一个居中布局 mCenterLayout = new LinearLayout(context); - LinearLayout.LayoutParams centerLp = new LinearLayout.LayoutParams( - LinearLayout.LayoutParams.WRAP_CONTENT, - LinearLayout.LayoutParams.MATCH_PARENT + LinearLayout.LayoutParams centerLp = new LinearLayout.LayoutParams( + LinearLayout.LayoutParams.WRAP_CONTENT, + LinearLayout.LayoutParams.MATCH_PARENT ); mCenterLayout.setLayoutParams(centerLp); mCenterLayout.setGravity(Gravity.CENTER | Gravity.CENTER_VERTICAL); - //增加一个右布局 + // 增加一个右布局 mRightLayout = new LinearLayout(context); LinearLayout.LayoutParams rightLp = new LinearLayout.LayoutParams(0, LinearLayout.LayoutParams.MATCH_PARENT, 1.0f); mRightLayout.setLayoutParams(rightLp); diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/MiuiGxzwSize.java b/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/MiuiGxzwSize.java index e9302f40cc..b818b840b5 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/MiuiGxzwSize.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/MiuiGxzwSize.java @@ -2,9 +2,6 @@ import com.sevtinge.cemiuiler.module.base.BaseHook; -import de.robv.android.xposed.XC_MethodReplacement; -import de.robv.android.xposed.XposedHelpers; - public class MiuiGxzwSize extends BaseHook { @Override diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/MonetThemeOverlay.java b/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/MonetThemeOverlay.java index ebec4066b0..c923891743 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/MonetThemeOverlay.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/MonetThemeOverlay.java @@ -7,7 +7,7 @@ import com.sevtinge.cemiuiler.utils.LogUtils; import com.sevtinge.cemiuiler.utils.PrefsUtils; -public class MonetThemeOverlay extends BaseHook { +public class MonetThemeOverlay extends BaseHook { Class THEME_CLASS_AOSP; Context mContext; diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/NotificationFreeform.java b/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/NotificationFreeform.java index a686f5adda..50730e8499 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/NotificationFreeform.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/NotificationFreeform.java @@ -11,7 +11,7 @@ public void init() { mNotificationCls = findClassIfExists("com.android.systemui.statusbar.notification.NotificationSettingsManager"); - findAndHookMethod(mNotificationCls,"canSlide",String.class, new MethodHook() { + findAndHookMethod(mNotificationCls, "canSlide", String.class, new MethodHook() { @Override protected void after(MethodHookParam param) throws Throwable { param.setResult(true); diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/OriginChargeAnimation.java b/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/OriginChargeAnimation.java index 16a4ffca1a..1ada57eced 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/OriginChargeAnimation.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/OriginChargeAnimation.java @@ -3,8 +3,6 @@ import com.sevtinge.cemiuiler.module.base.BaseHook; import com.sevtinge.cemiuiler.utils.Helpers; -import de.robv.android.xposed.XposedHelpers; - public class OriginChargeAnimation extends BaseHook { Class mOriginChargeAnimCls; diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/QSLabelsHook.java b/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/QSLabelsHook.java index acde39928d..965d293bc7 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/QSLabelsHook.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/QSLabelsHook.java @@ -34,10 +34,10 @@ protected void after(MethodHookParam param) throws Throwable { @Override protected void before(MethodHookParam param) throws Throwable { if (param.args.length != 1) return; - View mLabelContainer = (View)XposedHelpers.getObjectField(param.thisObject, "labelContainer"); + View mLabelContainer = (View) XposedHelpers.getObjectField(param.thisObject, "labelContainer"); if (mLabelContainer != null) { mLabelContainer.setVisibility( - mPrefsMap.getBoolean("system_ui_qs_label") ? View.GONE : View.VISIBLE + mPrefsMap.getBoolean("system_ui_qs_label") ? View.GONE : View.VISIBLE ); } } diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/StatusBarActions.java b/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/StatusBarActions.java index cb26fe018b..b28160007a 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/StatusBarActions.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/StatusBarActions.java @@ -12,7 +12,6 @@ import android.view.View; import com.sevtinge.cemiuiler.module.base.BaseHook; - import com.sevtinge.cemiuiler.utils.Helpers; import com.sevtinge.cemiuiler.utils.SdkHelper; @@ -37,7 +36,7 @@ public void init() { setupRestartSystemUIAction(); } - //StatusBarActions + // StatusBarActions public void setupStatusBarAction() { findAndHookMethod(mStatusBarClass, "start", new MethodHook() { @@ -80,7 +79,7 @@ public void onReceive(Context context, Intent intent) { case ACTION_PREFIX + "ClearMemory": Intent clearIntent = new Intent("com.android.systemui.taskmanager.Clear"); clearIntent.putExtra("show_toast", true); - //clearIntent.putExtra("clean_type", -1); + // clearIntent.putExtra("clean_type", -1); context.sendBroadcast(clearIntent); break; @@ -97,8 +96,8 @@ public void onReceive(Context context, Intent intent) { case ACTION_PREFIX + "OpenNotificationCenter": try { Object mNotificationPanel = XposedHelpers.getObjectField(mStatusBar, "mNotificationPanel"); - boolean mPanelExpanded = (boolean)XposedHelpers.getObjectField(mNotificationPanel, "mPanelExpanded"); - boolean mQsExpanded = (boolean)XposedHelpers.getObjectField(mNotificationPanel, "mQsExpanded"); + boolean mPanelExpanded = (boolean) XposedHelpers.getObjectField(mNotificationPanel, "mPanelExpanded"); + boolean mQsExpanded = (boolean) XposedHelpers.getObjectField(mNotificationPanel, "mQsExpanded"); boolean expandOnly = intent.getBooleanExtra("expand_only", false); if (mPanelExpanded) { if (!expandOnly) { @@ -132,22 +131,22 @@ public static void OpenVolumeDialogs(Context context) { return; } - Handler mHandler = (Handler)XposedHelpers.getObjectField(miuiVolumeDialog, "mHandler"); + Handler mHandler = (Handler) XposedHelpers.getObjectField(miuiVolumeDialog, "mHandler"); mHandler.post(new Runnable() { @Override public void run() { boolean mShowing = XposedHelpers.getBooleanField(miuiVolumeDialog, "mShowing"); boolean mExpanded = XposedHelpers.getBooleanField(miuiVolumeDialog, "mExpanded"); - AudioManager am = (AudioManager)context.getSystemService(Context.AUDIO_SERVICE); + AudioManager am = (AudioManager) context.getSystemService(Context.AUDIO_SERVICE); boolean isInCall = am.getMode() == AudioManager.MODE_IN_CALL || am.getMode() == AudioManager.MODE_IN_COMMUNICATION; if (mShowing) { if (mExpanded || isInCall) XposedHelpers.callMethod(miuiVolumeDialog, "dismissH", 1); else { Object mDialogView = XposedHelpers.getObjectField(miuiVolumeDialog, "mDialogView"); - View mExpandButton = (View)XposedHelpers.getObjectField(mDialogView, "mExpandButton"); - View.OnClickListener mClickExpand = (View.OnClickListener)XposedHelpers.getObjectField(mDialogView, "expandListener"); + View mExpandButton = (View) XposedHelpers.getObjectField(mDialogView, "mExpandButton"); + View.OnClickListener mClickExpand = (View.OnClickListener) XposedHelpers.getObjectField(mDialogView, "expandListener"); mClickExpand.onClick(mExpandButton); } } else { diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/controlcenter/CompactNotificationsHook.kt b/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/controlcenter/CompactNotificationsHook.kt index 508f19b279..acb3fe75d1 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/controlcenter/CompactNotificationsHook.kt +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/controlcenter/CompactNotificationsHook.kt @@ -31,7 +31,7 @@ object CompactNotificationsHook : BaseHook() { if (param.args.size > 3) return val res = param.result ?: return val mView = XposedHelpers.getObjectField(res, "mView") as View - //if (mView.getId() != mView.getResources().getIdentifier("status_bar_latest_event_content", "id", "android")) return; + // if (mView.getId() != mView.getResources().getIdentifier("status_bar_latest_event_content", "id", "android")) return; val container = mView.findViewById( mView.resources.getIdentifier("actions_container", "id", "android") ) ?: return @@ -53,4 +53,4 @@ object CompactNotificationsHook : BaseHook() { }) } -} \ No newline at end of file +} diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/controlcenter/MuteVisibleNotifications.java b/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/controlcenter/MuteVisibleNotifications.java index 62193a7233..e62aacafe9 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/controlcenter/MuteVisibleNotifications.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/controlcenter/MuteVisibleNotifications.java @@ -13,15 +13,15 @@ public class MuteVisibleNotifications extends BaseHook { @Override public void init() { Helpers.hookAllMethods("com.android.systemui.statusbar.notification.policy.NotificationAlertController", lpparam.classLoader, "buzzBeepBlink", new MethodHook() { - @Override - protected void before(MethodHookParam param) throws Throwable { - Context mContext = (Context) XposedHelpers.getObjectField(param.thisObject, "mContext"); - PowerManager powerMgr = (PowerManager) mContext.getSystemService(Context.POWER_SERVICE); - if (powerMgr.isInteractive()) { - param.setResult(null); - } + @Override + protected void before(MethodHookParam param) throws Throwable { + Context mContext = (Context) XposedHelpers.getObjectField(param.thisObject, "mContext"); + PowerManager powerMgr = (PowerManager) mContext.getSystemService(Context.POWER_SERVICE); + if (powerMgr.isInteractive()) { + param.setResult(null); } } + } ); } } diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/controlcenter/NotificationWeather.kt b/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/controlcenter/NotificationWeather.kt index 66d25b4236..674d3a2468 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/controlcenter/NotificationWeather.kt +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/controlcenter/NotificationWeather.kt @@ -1,7 +1,6 @@ package com.sevtinge.cemiuiler.module.systemui.controlcenter import android.annotation.SuppressLint -import com.sevtinge.cemiuiler.module.base.BaseHook import android.content.ComponentName import android.content.Intent import android.view.View @@ -13,10 +12,11 @@ import androidx.constraintlayout.widget.ConstraintLayout import com.github.kyuubiran.ezxhelper.ClassUtils.loadClass import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHook import com.github.kyuubiran.ezxhelper.finders.MethodFinder.`-Static`.methodFinder -import com.sevtinge.cemiuiler.view.WeatherView +import com.sevtinge.cemiuiler.module.base.BaseHook import com.sevtinge.cemiuiler.utils.SystemProperties import com.sevtinge.cemiuiler.utils.getObjectField import com.sevtinge.cemiuiler.utils.setObjectField +import com.sevtinge.cemiuiler.view.WeatherView import moralnorm.internal.utils.DisplayUtils.dp2px @@ -37,7 +37,7 @@ object NotificationWeather : BaseHook() { if (SystemProperties[context, "ro.build.date.utc"].toInt() >= 1647014400 && !SystemProperties[context, "ro.build.version.incremental"].endsWith("XM") ) { - //获取原组件 + // 获取原组件 val bigTimeId = context.resources.getIdentifier("big_time", "id", context.packageName) val bigTime: TextView = viewGroup.findViewById(bigTimeId) @@ -46,7 +46,7 @@ object NotificationWeather : BaseHook() { context.resources.getIdentifier("date_time", "id", context.packageName) val dateTime: TextView = viewGroup.findViewById(dateTimeId) - //创建新布局 + // 创建新布局 val mConstraintLayoutLp = LinearLayout.LayoutParams( LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT @@ -66,16 +66,16 @@ object NotificationWeather : BaseHook() { (bigTime.parent as ViewGroup).addView(mConstraintLayout, 0) - //从原布局中删除组件 + // 从原布局中删除组件 (bigTime.parent as ViewGroup).removeView(bigTime) (dateTime.parent as ViewGroup).removeView(dateTime) - //添加组件至新布局 + // 添加组件至新布局 mConstraintLayout!!.addView(bigTime) mConstraintLayout!!.addView(dateTime) - //组件属性 + // 组件属性 val dateTimeLp = ConstraintLayout.LayoutParams( ConstraintLayout.LayoutParams.WRAP_CONTENT, @@ -95,7 +95,7 @@ object NotificationWeather : BaseHook() { dateTime.layoutParams = dateTimeLp - //创建天气组件 + // 创建天气组件 mWeatherView = WeatherView(context, isDisplayCity).apply { setTextAppearance( context.resources.getIdentifier( @@ -187,7 +187,9 @@ object NotificationWeather : BaseHook() { val context = viewGroup.context val mOrientation = viewGroup.getObjectField("mOrientation") as Int // MIUI编译时间大于 2022-03-12 00:00:00 且为内测版 - if (SystemProperties[context, "ro.build.date.utc"].toInt() >= 1647014400 && !SystemProperties[context, "ro.build.version.incremental"].endsWith("DEV") && + if (SystemProperties[context, "ro.build.date.utc"].toInt() >= 1647014400 && !SystemProperties[context, "ro.build.version.incremental"].endsWith( + "DEV" + ) && !SystemProperties[context, "ro.build.version.incremental"].endsWith("XM") ) { if (mOrientation == 1) { @@ -207,4 +209,4 @@ object NotificationWeather : BaseHook() { } -} \ No newline at end of file +} diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/controlcenter/NotificationWeatherNew.kt b/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/controlcenter/NotificationWeatherNew.kt index afd96214e5..c5187c774e 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/controlcenter/NotificationWeatherNew.kt +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/controlcenter/NotificationWeatherNew.kt @@ -6,10 +6,10 @@ import android.widget.TextView import com.github.kyuubiran.ezxhelper.ClassUtils.loadClass import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHook import com.github.kyuubiran.ezxhelper.finders.MethodFinder.`-Static`.methodFinder -import com.sevtinge.cemiuiler.view.WeatherData import com.sevtinge.cemiuiler.module.base.BaseHook import com.sevtinge.cemiuiler.utils.callMethod import com.sevtinge.cemiuiler.utils.getObjectFieldAs +import com.sevtinge.cemiuiler.view.WeatherData @SuppressLint("StaticFieldLeak") @@ -21,20 +21,21 @@ object NotificationWeatherNew : BaseHook() { @SuppressLint("DiscouragedApi", "ClickableViewAccessibility") override fun init() { val isDisplayCity = mPrefsMap.getBoolean("system_ui_control_center_show_weather_city") - val mControlCenterDateViewClass = loadClass("com.android.systemui.controlcenter.phone.widget.ControlCenterDateView") + val mControlCenterDateViewClass = + loadClass("com.android.systemui.controlcenter.phone.widget.ControlCenterDateView") - mControlCenterDateViewClass .methodFinder().findSuper().first { + mControlCenterDateViewClass.methodFinder().findSuper().first { name == "onDetachedFromWindow" - }.createHook{ + }.createHook { before { if ((it.thisObject as TextView).id == clockId /* && this::weather.isInitialized */) { weather.onDetachedFromWindow() } } } - mControlCenterDateViewClass .methodFinder().findSuper().first { + mControlCenterDateViewClass.methodFinder().findSuper().first { name == "setText" - }.createHook{ + }.createHook { before { val time = it.args[0]?.toString() val view = it.thisObject as TextView @@ -50,26 +51,29 @@ object NotificationWeatherNew : BaseHook() { loadClass("com.android.systemui.shared.plugins.PluginManagerImpl").methodFinder().first { name == "getClassLoader" }.createHook { - after { getClassLoader -> - val appInfo = getClassLoader.args[0] as ApplicationInfo - val classLoader = getClassLoader.result as ClassLoader - if (appInfo.packageName == "miui.systemui.plugin") { - loadClass("miui.systemui.controlcenter.windowview.MainPanelHeaderController", classLoader).methodFinder().first { - name == "addClockViews" - }.createHook { - after { - val dateView = it.thisObject.getObjectFieldAs("dateView") - clockId = dateView.id - weather = WeatherData(dateView.context, isDisplayCity) - weather.callBacks = { - dateView.callMethod("updateTime") - } - } - } - } - } + after { getClassLoader -> + val appInfo = getClassLoader.args[0] as ApplicationInfo + val classLoader = getClassLoader.result as ClassLoader + if (appInfo.packageName == "miui.systemui.plugin") { + loadClass( + "miui.systemui.controlcenter.windowview.MainPanelHeaderController", + classLoader + ).methodFinder().first { + name == "addClockViews" + }.createHook { + after { + val dateView = it.thisObject.getObjectFieldAs("dateView") + clockId = dateView.id + weather = WeatherData(dateView.context, isDisplayCity) + weather.callBacks = { + dateView.callMethod("updateTime") + } + } + } + } + } } } -} \ No newline at end of file +} diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/controlcenter/NotificationWeatherOld.kt b/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/controlcenter/NotificationWeatherOld.kt index 2e11e7e03a..1fc648e1a7 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/controlcenter/NotificationWeatherOld.kt +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/controlcenter/NotificationWeatherOld.kt @@ -10,10 +10,10 @@ import android.widget.Toast import com.github.kyuubiran.ezxhelper.ClassUtils.loadClass import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHook import com.github.kyuubiran.ezxhelper.finders.MethodFinder.`-Static`.methodFinder -import com.sevtinge.cemiuiler.view.WeatherView import com.sevtinge.cemiuiler.module.base.BaseHook import com.sevtinge.cemiuiler.utils.getObjectField import com.sevtinge.cemiuiler.utils.setObjectField +import com.sevtinge.cemiuiler.view.WeatherView object NotificationWeatherOld : BaseHook() { @@ -90,7 +90,7 @@ object NotificationWeatherOld : BaseHook() { } } - //解决横屏重叠 + // 解决横屏重叠 loadClass("com.android.systemui.qs.MiuiQSHeaderView").methodFinder().first { name == "updateLayout" }.createHook { @@ -105,4 +105,4 @@ object NotificationWeatherOld : BaseHook() { } } -} \ No newline at end of file +} diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/controlcenter/QSControlDetailBackgroundAlpha.kt b/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/controlcenter/QSControlDetailBackgroundAlpha.kt index c231dc5d0e..123673f9dd 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/controlcenter/QSControlDetailBackgroundAlpha.kt +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/controlcenter/QSControlDetailBackgroundAlpha.kt @@ -10,18 +10,19 @@ import de.robv.android.xposed.XposedHelpers object QSControlDetailBackgroundAlpha : BaseHook() { override fun init() { - val qSControlDetailBackgroundAlpha = mPrefsMap.getInt("system_ui_control_center_control_detail_background_alpha", 255) + val qSControlDetailBackgroundAlpha = + mPrefsMap.getInt("system_ui_control_center_control_detail_background_alpha", 255) val qSControlDetailClass = findClassIfExists( "com.android.systemui.controlcenter.phone.detail.QSControlDetail" ) - if(qSControlDetailClass != null){ + if (qSControlDetailClass != null) { XposedHelpers.findAndHookMethod( qSControlDetailClass, "updateBackground", object : XC_MethodHook() { override fun afterHookedMethod(param: MethodHookParam) { - val mDetailContainer = HookUtils.getValueByField(param.thisObject,"mDetailContainer") as View - if(mDetailContainer.background != null){ + val mDetailContainer = HookUtils.getValueByField(param.thisObject, "mDetailContainer") as View + if (mDetailContainer.background != null) { val smoothRoundDrawable = mDetailContainer.background smoothRoundDrawable.alpha = qSControlDetailBackgroundAlpha } @@ -31,14 +32,14 @@ object QSControlDetailBackgroundAlpha : BaseHook() { val modalQSControlDetailClass = findClassIfExists( "com.android.systemui.statusbar.notification.modal.ModalQSControlDetail" ) - if(modalQSControlDetailClass != null){ + if (modalQSControlDetailClass != null) { XposedHelpers.findAndHookMethod( modalQSControlDetailClass, "updateBackground", object : XC_MethodHook() { override fun afterHookedMethod(param: MethodHookParam) { - val mDetailContainer = HookUtils.getValueByField(param.thisObject,"mDetailContainer") as View - if(mDetailContainer.background != null){ + val mDetailContainer = HookUtils.getValueByField(param.thisObject, "mDetailContainer") as View + if (mDetailContainer.background != null) { val smoothRoundDrawable = mDetailContainer.background smoothRoundDrawable.alpha = qSControlDetailBackgroundAlpha } @@ -46,7 +47,7 @@ object QSControlDetailBackgroundAlpha : BaseHook() { }) } - hookClassInPlugin{classLoader -> + hookClassInPlugin { classLoader -> try { val smoothRoundDrawableClass = XposedHelpers.callMethod( classLoader, @@ -139,4 +140,4 @@ object QSControlDetailBackgroundAlpha : BaseHook() { return } } -} \ No newline at end of file +} diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/controlcenter/QSFiveGTile.java b/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/controlcenter/QSFiveGTile.java index 10c2b6f387..5812f23d8b 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/controlcenter/QSFiveGTile.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/controlcenter/QSFiveGTile.java @@ -37,10 +37,10 @@ public void init() { int mFiveGIconOffResId = mResHook.addResource("ic_control_center_5g_toggle_off", R.drawable.ic_control_center_5g_toggle_off); mQSFactoryClsName = SdkHelper.ATLEAST_T ? "com.android.systemui.qs.tileimpl.MiuiQSFactory" : - "com.android.systemui.qs.tileimpl.QSFactoryImpl"; + "com.android.systemui.qs.tileimpl.QSFactoryImpl"; mNfcTileClsName = SdkHelper.ATLEAST_T ? "com.android.systemui.qs.tiles.MiuiNfcTile" : - "com.android.systemui.qs.tiles.NfcTile"; + "com.android.systemui.qs.tiles.NfcTile"; mQSFactory = findClassIfExists(mQSFactoryClsName); mNfcTile = findClassIfExists(mNfcTileClsName); diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/controlcenter/QSGrid.java b/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/controlcenter/QSGrid.java index ed632be2cb..435724266e 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/controlcenter/QSGrid.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/controlcenter/QSGrid.java @@ -27,7 +27,8 @@ public void init() { case 5 -> rowsRes = R.integer.quick_settings_num_rows_5; } - if (cols > 2) mResHook.setResReplacement("com.android.systemui", "integer", "quick_settings_num_columns", colsRes); + if (cols > 2) + mResHook.setResReplacement("com.android.systemui", "integer", "quick_settings_num_columns", colsRes); if (rows > 1) mResHook.setResReplacement("com.android.systemui", "integer", "quick_settings_num_rows", rowsRes); } } diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/controlcenter/QSGridLabels.java b/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/controlcenter/QSGridLabels.java index f93874d6e5..2f44e832ca 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/controlcenter/QSGridLabels.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/controlcenter/QSGridLabels.java @@ -17,7 +17,7 @@ public void init() { Helpers.hookAllMethods("com.android.systemui.qs.MiuiTileLayout", lpparam.classLoader, "addTile", new MethodHook() { @Override protected void before(MethodHookParam param) throws Throwable { - updateLabelsVisibility(param.args[0], XposedHelpers.getIntField(param.thisObject, "mRows"), ((ViewGroup)param.thisObject).getResources().getConfiguration().orientation); + updateLabelsVisibility(param.args[0], XposedHelpers.getIntField(param.thisObject, "mRows"), ((ViewGroup) param.thisObject).getResources().getConfiguration().orientation); } }); @@ -25,11 +25,11 @@ protected void before(MethodHookParam param) throws Throwable { @Override @SuppressWarnings("unchecked") protected void before(MethodHookParam param) throws Throwable { - ArrayList mPages = (ArrayList)XposedHelpers.getObjectField(param.thisObject, "mPages"); + ArrayList mPages = (ArrayList) XposedHelpers.getObjectField(param.thisObject, "mPages"); if (mPages == null) return; int mRows = 0; if (mPages.size() > 0) mRows = XposedHelpers.getIntField(mPages.get(0), "mRows"); - updateLabelsVisibility(param.args[0], mRows, ((ViewGroup)param.thisObject).getResources().getConfiguration().orientation); + updateLabelsVisibility(param.args[0], mRows, ((ViewGroup) param.thisObject).getResources().getConfiguration().orientation); } }); @@ -40,10 +40,10 @@ protected void before(MethodHookParam param) throws Throwable { protected void after(MethodHookParam param) throws Throwable { ViewGroup mLabelContainer = (ViewGroup) XposedHelpers.getObjectField(param.thisObject, "mLabelContainer"); if (mLabelContainer != null) mLabelContainer.setPadding( - mLabelContainer.getPaddingLeft(), - Math.round(mLabelContainer.getResources().getDisplayMetrics().density * 2), - mLabelContainer.getPaddingRight(), - mLabelContainer.getPaddingBottom() + mLabelContainer.getPaddingLeft(), + Math.round(mLabelContainer.getResources().getDisplayMetrics().density * 2), + mLabelContainer.getPaddingRight(), + mLabelContainer.getPaddingBottom() ); } }); @@ -56,15 +56,15 @@ private static void updateLabelsVisibility(Object mRecord, int mRows, int orient if (tileView != null) { ViewGroup mLabelContainer = null; try { - mLabelContainer = (ViewGroup)XposedHelpers.getObjectField(tileView, "mLabelContainer"); + mLabelContainer = (ViewGroup) XposedHelpers.getObjectField(tileView, "mLabelContainer"); + } catch (Throwable ignore) { } - catch (Throwable ignore) {} if (mLabelContainer != null) { mLabelContainer.setVisibility( - mPrefsMap.getBoolean("system_control_center_qs_tile_label") || - orientation == Configuration.ORIENTATION_PORTRAIT && mRows >= 5 || - orientation == Configuration.ORIENTATION_LANDSCAPE && mRows >= 3 ? View.GONE : View.VISIBLE + mPrefsMap.getBoolean("system_control_center_qs_tile_label") || + orientation == Configuration.ORIENTATION_PORTRAIT && mRows >= 5 || + orientation == Configuration.ORIENTATION_LANDSCAPE && mRows >= 3 ? View.GONE : View.VISIBLE ); } } diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/display/AutoBrightness.java b/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/display/AutoBrightness.java index 9f0bebe05b..768233135e 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/display/AutoBrightness.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/display/AutoBrightness.java @@ -95,8 +95,7 @@ public void onChange(Uri uri) { int defVal = "pref_key_system_control_center_min_brightness".equals(key) ? 25 : 75; mPrefsMap.put(key, Helpers.getSharedIntPref(mContext, key, defVal)); } - case "boolean" -> - mPrefsMap.put(key, Helpers.getSharedBoolPref(mContext, key, false)); + case "boolean" -> mPrefsMap.put(key, Helpers.getSharedBoolPref(mContext, key, false)); } } catch (Throwable t) { Helpers.log(t); diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/lockscreen/AddBlurEffectToLockScreen.kt b/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/lockscreen/AddBlurEffectToLockScreen.kt index eb70f53539..e3873f74f3 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/lockscreen/AddBlurEffectToLockScreen.kt +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/lockscreen/AddBlurEffectToLockScreen.kt @@ -24,7 +24,7 @@ object AddBlurEffectToLockScreen : BaseHook() { "com.android.keyguard.magazine.LockScreenMagazineController" ) ?: return - //to com.sevtinge.cemiuiler.module.systemui.lockscreen.BlurButton + // to com.sevtinge.cemiuiler.module.systemui.lockscreen.BlurButton /*XposedBridge.hookAllMethods( keyguardBottomAreaViewClass, "onAttachedToWindow", @@ -165,7 +165,7 @@ object AddBlurEffectToLockScreen : BaseHook() { } }) - //控制中心异常 + // 控制中心异常 /*XposedBridge.hookAllMethods( keyguardMoveHelperClass, "setTranslation", @@ -269,7 +269,7 @@ object AddBlurEffectToLockScreen : BaseHook() { }) */ - //锁屏过渡至桌面模糊异常 + // 锁屏过渡至桌面模糊异常 /* XposedBridge.hookAllMethods( baseKeyguardMoveHelperClass, @@ -460,4 +460,4 @@ object AddBlurEffectToLockScreen : BaseHook() { ) as Boolean } -} \ No newline at end of file +} diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/lockscreen/BlurButton.kt b/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/lockscreen/BlurButton.kt index bf12698fa0..35631aa2fc 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/lockscreen/BlurButton.kt +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/lockscreen/BlurButton.kt @@ -7,7 +7,6 @@ import android.graphics.drawable.LayerDrawable import android.view.View import android.widget.ImageView import com.sevtinge.cemiuiler.module.base.BaseHook -import com.sevtinge.cemiuiler.utils.HookUtils import com.sevtinge.cemiuiler.utils.HookUtils.createBlurDrawable import com.sevtinge.cemiuiler.utils.HookUtils.getValueByField import de.robv.android.xposed.XC_MethodHook @@ -22,7 +21,7 @@ object BlurButton : BaseHook() { var mRightAffordanceView: WeakReference? = null var keyguardBottomAreaView: WeakReference? = null - //from com.sevtinge.cemiuiler.module.systemui.lockscreen.AddBlurEffectToLockScreen + // from com.sevtinge.cemiuiler.module.systemui.lockscreen.AddBlurEffectToLockScreen val keyguardBottomAreaViewClass = findClassIfExists( "com.android.systemui.statusbar.phone.KeyguardBottomAreaView" @@ -82,4 +81,4 @@ object BlurButton : BaseHook() { } }, 0, 100) } -} \ No newline at end of file +} diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/lockscreen/ChargingCVP.kt b/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/lockscreen/ChargingCVP.kt index 075fc253bf..05489b6c02 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/lockscreen/ChargingCVP.kt +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/lockscreen/ChargingCVP.kt @@ -27,14 +27,14 @@ object ChargingCVP : BaseHook() { .filterByName("getChargingHintText") .filterByParamCount(3) .first().createHook { - after { - if (it.result != null) { - it.result = it.result as String + "\n" + getCVP() + after { + if (it.result != null) { + it.result = it.result as String + "\n" + getCVP() + } } } - } - loadClassOrNull("com.android.systemui.statusbar.phone.KeyguardIndicationTextView")?.constructors?.createHooks { + loadClassOrNull("com.android.systemui.statusbar.phone.KeyguardIndicationTextView")?.constructors?.createHooks { after { (it.thisObject as TextView).isSingleLine = false } @@ -57,11 +57,11 @@ object ChargingCVP : BaseHook() { val power = String.format("%.2f", powerAll) // 电流/电压展示逻辑设置 - val mCurrent = when(mPrefsMap.getBoolean("system_ui_show_charging_c_more")) { + val mCurrent = when (mPrefsMap.getBoolean("system_ui_show_charging_c_more")) { true -> "$current mA" else -> "${String.format("%.1f", abs(current / 1000f))} A" } - val mVoltage = when(mPrefsMap.getBoolean("system_ui_show_charging_v_more")) { + val mVoltage = when (mPrefsMap.getBoolean("system_ui_show_charging_v_more")) { true -> "${voltage.toInt()} mV" else -> "${String.format("%.1f", abs(voltage / 1000f))} V" } @@ -69,4 +69,4 @@ object ChargingCVP : BaseHook() { return "$mCurrent · $mVoltage · $power W" } -} \ No newline at end of file +} diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/lockscreen/ClockDisplaySeconds.kt b/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/lockscreen/ClockDisplaySeconds.kt index d5e20e8333..fcd61d1716 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/lockscreen/ClockDisplaySeconds.kt +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/lockscreen/ClockDisplaySeconds.kt @@ -1,6 +1,5 @@ package com.sevtinge.cemiuiler.module.systemui.lockscreen -import com.sevtinge.cemiuiler.module.base.BaseHook import android.annotation.SuppressLint import android.content.Context import android.os.Handler @@ -13,6 +12,7 @@ import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHook import com.github.kyuubiran.ezxhelper.MemberExtensions.paramCount import com.github.kyuubiran.ezxhelper.finders.ConstructorFinder.`-Static`.constructorFinder import com.github.kyuubiran.ezxhelper.finders.MethodFinder.`-Static`.methodFinder +import com.sevtinge.cemiuiler.module.base.BaseHook import com.sevtinge.cemiuiler.utils.getObjectFieldAs import de.robv.android.xposed.XC_MethodHook import java.lang.reflect.Method @@ -22,7 +22,7 @@ import java.util.* object ClockDisplaySeconds : BaseHook() { private var nowTime: Date = Calendar.getInstance().time - override fun init() { + override fun init() { loadClass("com.miui.clock.MiuiBaseClock").constructorFinder().first { paramCount == 2 }.createHook { @@ -88,12 +88,12 @@ object ClockDisplaySeconds : BaseHook() { @SuppressLint("SimpleDateFormat") private fun getTime(is24: Boolean, isVertical: Boolean): String { var timePattern = "" - timePattern += if (isVertical) { //垂直 + timePattern += if (isVertical) { // 垂直 if (is24) "HH\nmm\nss" else "hh\nmm\nss" - } else { //水平 + } else { // 水平 if (is24) "HH:mm:ss" else "h:mm:ss" } timePattern = SimpleDateFormat(timePattern).format(nowTime) return timePattern } -} \ No newline at end of file +} diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/lockscreen/RemoveCamera.kt b/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/lockscreen/RemoveCamera.kt index c6762fc4ec..841c5c5777 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/lockscreen/RemoveCamera.kt +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/lockscreen/RemoveCamera.kt @@ -1,16 +1,16 @@ package com.sevtinge.cemiuiler.module.systemui.lockscreen -import com.sevtinge.cemiuiler.module.base.BaseHook import android.view.View import android.widget.LinearLayout import com.github.kyuubiran.ezxhelper.ClassUtils.loadClass import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHook import com.github.kyuubiran.ezxhelper.finders.MethodFinder.`-Static`.methodFinder +import com.sevtinge.cemiuiler.module.base.BaseHook import com.sevtinge.cemiuiler.utils.getObjectField object RemoveCamera : BaseHook() { override fun init() { - //屏蔽右下角组件显示 + // 屏蔽右下角组件显示 loadClass("com.android.systemui.statusbar.phone.KeyguardBottomAreaView").methodFinder().first { name == "onFinishInflate" }.createHook { @@ -20,7 +20,7 @@ object RemoveCamera : BaseHook() { } } - //屏蔽滑动撞墙动画 + // 屏蔽滑动撞墙动画 loadClass("com.android.keyguard.KeyguardMoveRightController").methodFinder().first { name == "onTouchMove" && parameterCount == 2 }.createHook { @@ -37,4 +37,4 @@ object RemoveCamera : BaseHook() { } } -} \ No newline at end of file +} diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/lockscreen/ScramblePIN.java b/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/lockscreen/ScramblePIN.java index ca7f92d5db..a8140f801f 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/lockscreen/ScramblePIN.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/lockscreen/ScramblePIN.java @@ -33,7 +33,7 @@ protected void after(MethodHookParam param) throws Throwable { mRandomViews.add(mViews[4][1]); Collections.shuffle(mRandomViews); - View pinview = (View)param.thisObject; + View pinview = (View) param.thisObject; ViewGroup row1 = pinview.findViewById(pinview.getResources().getIdentifier("row1", "id", "com.android.systemui")); ViewGroup row2 = pinview.findViewById(pinview.getResources().getIdentifier("row2", "id", "com.android.systemui")); ViewGroup row3 = pinview.findViewById(pinview.getResources().getIdentifier("row3", "id", "com.android.systemui")); diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/navigation/HandleLineCustom.kt b/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/navigation/HandleLineCustom.kt index ce441252d5..587e5ac5e9 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/navigation/HandleLineCustom.kt +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/navigation/HandleLineCustom.kt @@ -49,11 +49,11 @@ object HandleLineCustom : BaseHook() { } catch (Exception e) { log(String.valueOf(e)); }*/ - //写法2 - //mResHook.setDensityReplacement("com.android.systemui", "dimen_land", "navigation_home_handle_width", mNavigationHomeHandleWidthLand); + // 写法2 + // mResHook.setDensityReplacement("com.android.systemui", "dimen_land", "navigation_home_handle_width", mNavigationHomeHandleWidthLand); - //mResHook.setDensityReplacement("com.android.systemui", "dimen", "navigation_handle_horizontal_margin", 3); - //mResHook.setDensityReplacement("com.android.systemui", "dimen", "navigation_handle_sample_horizontal_margin", 3); + // mResHook.setDensityReplacement("com.android.systemui", "dimen", "navigation_handle_horizontal_margin", 3); + // mResHook.setDensityReplacement("com.android.systemui", "dimen", "navigation_handle_sample_horizontal_margin", 3); } fun initResource(resParam: InitPackageResourcesParam) { diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/navigation/NavigationCustom.java b/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/navigation/NavigationCustom.java index 4d112f603f..2c29e2175b 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/navigation/NavigationCustom.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/navigation/NavigationCustom.java @@ -27,7 +27,7 @@ public void init() { log(String.valueOf(e)); } try { - mResHook.setDensityReplacement("com.android.systemui", "dimen", "navigation_bar_frame_height_landscape", mNavigationFrameHeightLand); + mResHook.setDensityReplacement("com.android.systemui", "dimen", "navigation_bar_frame_height_landscape", mNavigationFrameHeightLand); } catch (Exception e) { log(String.valueOf(e)); } diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/plugin/EnableVolumeBlur.java b/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/plugin/EnableVolumeBlur.java index ffe5c4a1dc..590d3ee3bc 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/plugin/EnableVolumeBlur.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/plugin/EnableVolumeBlur.java @@ -1,7 +1,5 @@ package com.sevtinge.cemiuiler.module.systemui.plugin; -import com.sevtinge.cemiuiler.module.base.BaseHook; - import de.robv.android.xposed.XC_MethodReplacement; import de.robv.android.xposed.XposedHelpers; diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/plugin/PluginHelper.java b/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/plugin/PluginHelper.java index 927de4f5d4..8a01b4e380 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/plugin/PluginHelper.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/plugin/PluginHelper.java @@ -6,8 +6,6 @@ import com.sevtinge.cemiuiler.module.base.BaseHook; -import de.robv.android.xposed.XposedHelpers; - public class PluginHelper extends BaseHook { private static ClassLoader pluginLoader = null; diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/statusbar/BigMobileNetworkType.java b/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/statusbar/BigMobileNetworkType.java index 2b3333058a..6e4a705ec1 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/statusbar/BigMobileNetworkType.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/statusbar/BigMobileNetworkType.java @@ -44,43 +44,43 @@ protected void after(final MethodHookParam param) throws Throwable { @SuppressLint("DiscouragedApi") private void old() { - findAndHookMethod("com.android.systemui.statusbar.StatusBarMobileView","init", new MethodHook() { + findAndHookMethod("com.android.systemui.statusbar.StatusBarMobileView", "init", new MethodHook() { @Override protected void after(MethodHookParam param) throws Throwable { ViewGroup mStatusBarMobileView = (ViewGroup) param.thisObject; Context mContext = mStatusBarMobileView.getContext(); Resources mRes = mContext.getResources(); - //获取组件 - //mMobileLeftContainer + // 获取组件 + // mMobileLeftContainer int mobileContainerLeftId = mRes.getIdentifier("mobile_container_left", "id", "com.android.systemui"); - //mMobileType + // mMobileType int mobileTypeId = mRes.getIdentifier("mobile_type", "id", "com.android.systemui"); - //mLeftInOut + // mLeftInOut int mobileLeftMobileInoutId = mRes.getIdentifier( - "mobile_left_mobile_inout", - "id", - "com.android.systemui"); + "mobile_left_mobile_inout", + "id", + "com.android.systemui"); ViewGroup mobileContainerLeft = mStatusBarMobileView.findViewById(mobileContainerLeftId); TextView mobileType = mStatusBarMobileView.findViewById(mobileTypeId); ImageView mobileLeftMobileInout = mStatusBarMobileView.findViewById(mobileLeftMobileInoutId); - //获取插入位置 - //mMobileRightContainer + // 获取插入位置 + // mMobileRightContainer int mobileContainerRightId = mRes.getIdentifier( - "mobile_container_right", - "id", - "com.android.systemui" + "mobile_container_right", + "id", + "com.android.systemui" ); ViewGroup mobileContainerRight = mStatusBarMobileView.findViewById(mobileContainerRightId); ViewGroup rightParentLayout = (ViewGroup) mobileContainerRight.getParent(); int mobileContainerRightIndex = rightParentLayout.indexOfChild(mobileContainerRight); - //创建新布局 + // 创建新布局 LinearLayout.LayoutParams newLinearLayoutLP = new LinearLayout.LayoutParams( - LinearLayout.LayoutParams.WRAP_CONTENT, - LinearLayout.LayoutParams.MATCH_PARENT + LinearLayout.LayoutParams.WRAP_CONTENT, + LinearLayout.LayoutParams.MATCH_PARENT ); LinearLayout newLinearlayout = new LinearLayout(mContext); @@ -89,20 +89,20 @@ protected void after(MethodHookParam param) throws Throwable { newLinearlayout.setPadding(0, 0, 0, 0); - XposedHelpers.setObjectField(param.thisObject,"mMobileLeftContainer", newLinearlayout); + XposedHelpers.setObjectField(param.thisObject, "mMobileLeftContainer", newLinearlayout); rightParentLayout.addView(newLinearlayout, mobileContainerRightIndex); - //将组件插入新的布局 + // 将组件插入新的布局 ((ViewGroup) mobileType.getParent()).removeView(mobileType); ((ViewGroup) mobileLeftMobileInout.getParent()).removeView(mobileLeftMobileInout); ((ViewGroup) mobileContainerLeft.getParent()).removeView(mobileContainerLeft); - //类型 + // 类型 newLinearlayout.addView(mobileType); - LinearLayout.LayoutParams mobileTypeLp = new LinearLayout.LayoutParams( - LinearLayout.LayoutParams.WRAP_CONTENT, - LinearLayout.LayoutParams.WRAP_CONTENT + LinearLayout.LayoutParams mobileTypeLp = new LinearLayout.LayoutParams( + LinearLayout.LayoutParams.WRAP_CONTENT, + LinearLayout.LayoutParams.WRAP_CONTENT ); mobileTypeLp.gravity = Gravity.CENTER_VERTICAL; @@ -116,15 +116,15 @@ protected void after(MethodHookParam param) throws Throwable { mobileType.setLayoutParams(mobileTypeLp); - //箭头 + // 箭头 newLinearlayout.addView(mobileLeftMobileInout); - LinearLayout.LayoutParams mobileLeftMobileInoutLp = new LinearLayout.LayoutParams( - LinearLayout.LayoutParams.WRAP_CONTENT, - LinearLayout.LayoutParams.MATCH_PARENT + LinearLayout.LayoutParams mobileLeftMobileInoutLp = new LinearLayout.LayoutParams( + LinearLayout.LayoutParams.WRAP_CONTENT, + LinearLayout.LayoutParams.MATCH_PARENT ); mobileLeftMobileInout.setLayoutParams(mobileLeftMobileInoutLp); - //屏蔽更新布局 + // 屏蔽更新布局 findAndHookMethod("com.android.systemui.statusbar.StatusBarMobileView", "updateMobileTypeLayout", String.class, new MethodHook() { @Override protected void before(MethodHookParam param) throws Throwable { diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/statusbar/BluetoothIcon.java b/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/statusbar/BluetoothIcon.java index 66643cac09..162404ae97 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/statusbar/BluetoothIcon.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/statusbar/BluetoothIcon.java @@ -17,12 +17,12 @@ protected void after(MethodHookParam param) throws Throwable { Object mIconController = XposedHelpers.getObjectField(param.thisObject, "mIconController"); if (opt == 2 || (opt == 3 && !isBluetoothConnected)) { XposedHelpers.callMethod(mIconController, "setIconVisibility", "bluetooth", false); - } else if (opt == 1){ + } else if (opt == 1) { XposedHelpers.callMethod(mIconController, "setIconVisibility", "bluetooth", true); } if (opt_b == 2 || (opt_b == 3 && !isBluetoothConnected)) { XposedHelpers.callMethod(mIconController, "setIconVisibility", "bluetooth_handsfree_battery", false); - } else if (opt_b == 1){ + } else if (opt_b == 1) { XposedHelpers.callMethod(mIconController, "setIconVisibility", "bluetooth_handsfree_battery", true); } } diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/statusbar/DisplayHardwareDetail.java b/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/statusbar/DisplayHardwareDetail.java index 44bc2d692c..406e190272 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/statusbar/DisplayHardwareDetail.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/statusbar/DisplayHardwareDetail.java @@ -1,5 +1,7 @@ package com.sevtinge.cemiuiler.module.systemui.statusbar; +import static de.robv.android.xposed.XposedHelpers.callMethod; + import android.annotation.SuppressLint; import android.content.Context; import android.content.res.Resources; @@ -31,8 +33,6 @@ import de.robv.android.xposed.XposedHelpers; -import static de.robv.android.xposed.XposedHelpers.callMethod; - public class DisplayHardwareDetail extends BaseHook { boolean showDeviceTemp; boolean showBatteryDetail; @@ -81,8 +81,8 @@ static class TextIconInfo { @Override public void init() { - showBatteryDetail = mPrefsMap.getBoolean("system_ui_statusbar_battery_enable"); //电池相关 - showDeviceTemp = mPrefsMap.getBoolean("system_ui_statusbar_temp_enable"); //温度相关 + showBatteryDetail = mPrefsMap.getBoolean("system_ui_statusbar_battery_enable"); // 电池相关 + showDeviceTemp = mPrefsMap.getBoolean("system_ui_statusbar_temp_enable"); // 温度相关 isTempAtRight = mPrefsMap.getBoolean("system_ui_statusbar_temp_right_show"); isBatteryAtRight = mPrefsMap.getBoolean("system_ui_statusbar_battery_right_show"); @@ -300,12 +300,12 @@ public void handleMessage(@NonNull Message message) { String currVal; int rawCurr = 0; try { - rawCurr = -1 * Math.round(Integer.parseInt(props.getProperty("POWER_SUPPLY_CURRENT_NOW")) / 1000f);//概率fc + rawCurr = -1 * Math.round(Integer.parseInt(props.getProperty("POWER_SUPPLY_CURRENT_NOW")) / 1000f);// 概率fc } catch (NumberFormatException e) { log("get POWER_SUPPLY_CURRENT_NOW failed: " + e); } String preferred = "mA"; - if (mPrefsMap.getBoolean("system_ui_statusbar_battery_electric_current")) { //电流始终显示正值 + if (mPrefsMap.getBoolean("system_ui_statusbar_battery_electric_current")) { // 电流始终显示正值 rawCurr = Math.abs(rawCurr); } if (Math.abs(rawCurr) > 999) { @@ -314,7 +314,7 @@ public void handleMessage(@NonNull Message message) { } else { currVal = "" + rawCurr; } - int opt = mPrefsMap.getStringAsInt("system_ui_statusbar_battery_show", 1); //电池显示内容 + int opt = mPrefsMap.getStringAsInt("system_ui_statusbar_battery_show", 1); // 电池显示内容 int hideUnit = mPrefsMap.getStringAsInt("system_ui_statusbar_battery_disable", 0); String powerUnit = (hideUnit == 1 || hideUnit == 2) ? "" : "W"; String currUnit = (hideUnit == 1 || hideUnit == 3) ? "" : preferred; @@ -322,7 +322,7 @@ public void handleMessage(@NonNull Message message) { float voltVal = Integer.parseInt(props.getProperty("POWER_SUPPLY_VOLTAGE_NOW")) / 1000f / 1000f; String simpleWatt = String.format(Locale.getDefault(), "%.2f", Math.abs(voltVal * rawCurr) / 1000); String splitChar = mPrefsMap.getBoolean("system_ui_statusbar_battery_line_show") - ? " " : "\n"; + ? " " : "\n"; batteryInfo = simpleWatt + powerUnit + splitChar + currVal + currUnit; if (mPrefsMap.getBoolean("system_ui_statusbar_battery_opposite")) { batteryInfo = currVal + currUnit + splitChar + simpleWatt + powerUnit; @@ -345,7 +345,7 @@ public void handleMessage(@NonNull Message message) { String tempUnit = hideUnit ? "" : "℃"; if (opt == 1) { String splitChar = mPrefsMap.getBoolean("system_ui_statusbar_temp_line_show") - ? " " : "\n"; + ? " " : "\n"; deviceInfo = simpleBatteryTemp + tempUnit + splitChar + simpleCpuTemp + tempUnit; if (mPrefsMap.getBoolean("system_ui_statusbar_temp_opposite")) { deviceInfo = simpleCpuTemp + tempUnit + splitChar + simpleBatteryTemp + tempUnit; @@ -434,26 +434,26 @@ private TextView createBatteryDetailView(Context mContext, LinearLayout.LayoutPa } if (fixedWidth > 10) lp.width = (int) (batteryView.getResources().getDisplayMetrics().density * fixedWidth); leftMargin = (int) TypedValue.applyDimension( - TypedValue.COMPLEX_UNIT_DIP, - leftMargin, - res.getDisplayMetrics() + TypedValue.COMPLEX_UNIT_DIP, + leftMargin, + res.getDisplayMetrics() ); int topMargin = 0; if (vertical != 0) { float marginTop = TypedValue.applyDimension( - TypedValue.COMPLEX_UNIT_DIP, - (vertical - 8) * 0.5f, - res.getDisplayMetrics() + TypedValue.COMPLEX_UNIT_DIP, + (vertical - 8) * 0.5f, + res.getDisplayMetrics() ); topMargin = (int) marginTop; } rightMargin = (int) TypedValue.applyDimension( - TypedValue.COMPLEX_UNIT_DIP, - rightMargin, - res.getDisplayMetrics() + TypedValue.COMPLEX_UNIT_DIP, + rightMargin, + res.getDisplayMetrics() ); batteryView.setPaddingRelative(leftMargin, topMargin, rightMargin, 0); batteryView.setLayoutParams(lp); return batteryView; } -} \ No newline at end of file +} diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/statusbar/DualRowSignalHook.java b/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/statusbar/DualRowSignalHook.java index 8eb259bece..f2135983e8 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/statusbar/DualRowSignalHook.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/statusbar/DualRowSignalHook.java @@ -36,6 +36,7 @@ public void init() { Helpers.findAndHookMethod("com.android.systemui.SystemUIApplication", lpparam.classLoader, "onCreate", new MethodHook() { private boolean isHooked = false; + @Override @SuppressLint("DiscouragedApi") protected void after(MethodHookParam param) throws Throwable { @@ -46,7 +47,7 @@ protected void after(MethodHookParam param) throws Throwable { for (int slot = 1; slot <= 2; slot++) { for (int lvl = 0; lvl <= 5; lvl++) { for (String colorMode : colorModeList) { - if (!selectedIconStyle.equals("theme") || !colorMode.equals("tint") ) { + if (!selectedIconStyle.equals("theme") || !colorMode.equals("tint")) { String dualIconResName = "statusbar_signal_" + slot + "_" + lvl + (!colorMode.equals("") ? ("_" + colorMode) : "") + (!selectedIconStyle.equals("") ? ("_" + selectedIconStyle) : ""); int iconResId = modRes.getIdentifier(dualIconResName, "drawable", Helpers.mAppModulePkg); dualSignalResMap.put(dualIconResName, mResHook.addResource(dualIconResName, iconResId)); @@ -64,6 +65,7 @@ protected void after(MethodHookParam param) throws Throwable { String ControllerImplName = moveSignalLeft ? "MiuiDripLeftStatusBarIconControllerImpl" : "StatusBarIconControllerImpl"; Helpers.hookAllMethods("com.android.systemui.statusbar.phone." + ControllerImplName, lpparam.classLoader, "setMobileIcons", new MethodHook() { private boolean isHooked = false; + @Override @SuppressLint("DiscouragedApi") protected void before(MethodHookParam param) throws Throwable { @@ -92,13 +94,12 @@ protected void before(MethodHookParam param) throws Throwable { int level; if (subDataConnected) { level = subLevel * 10 + mainLevel; - String[] syncFields = { "showName", "activityIn", "activityOut" }; + String[] syncFields = {"showName", "activityIn", "activityOut"}; for (String field : syncFields) { XposedHelpers.setObjectField(mainIconState, field, XposedHelpers.getObjectField(subIconState, field)); } XposedHelpers.setObjectField(mainIconState, "dataConnected", true); - } - else { + } else { level = mainLevel * 10 + subLevel; } XposedHelpers.setObjectField(mainIconState, "strengthId", level); @@ -116,8 +117,7 @@ protected void before(final MethodHookParam param) throws Throwable { int level = (int) XposedHelpers.getObjectField(mobileIconState, "strengthId"); if (!visible || airplane || level == 0 || level > 100) { XposedHelpers.setAdditionalInstanceField(param.thisObject, "subStrengthId", -1); - } - else { + } else { XposedHelpers.setAdditionalInstanceField(param.thisObject, "subStrengthId", level % 10); XposedHelpers.setObjectField(mobileIconState, "fiveGDrawableId", 0); } @@ -154,8 +154,7 @@ protected void before(final MethodHookParam param) throws Throwable { String colorMode = ""; if (mUseTint && !selectedIconStyle.equals("theme")) { colorMode = "_tint"; - } - else if (!mLight) { + } else if (!mLight) { colorMode = "_dark"; } String iconStyle = ""; @@ -173,7 +172,7 @@ else if (!mLight) { Helpers.findAndHookMethod("com.android.systemui.statusbar.StatusBarMobileView", lpparam.classLoader, "applyDarknessInternal", resetImageDrawable); int rightMargin = mPrefsMap.getInt("system_ui_statusbar_mobile_network_icon_right_margin", 0); int leftMargin = mPrefsMap.getInt("system_ui_statusbar_mobile_network_icon_left_margin", 0); - int iconScale = mPrefsMap.getInt("system_ui_statusbar_mobile_network_icon_size", 10); //图标缩放 + int iconScale = mPrefsMap.getInt("system_ui_statusbar_mobile_network_icon_size", 10); // 图标缩放 int verticalOffset = mPrefsMap.getInt("system_ui_statusbar_mobile_network_icon_vertical_offset", 8); if (rightMargin > 0 || leftMargin > 0 || iconScale != 10 || verticalOffset != 8) { Helpers.findAndHookMethod("com.android.systemui.statusbar.StatusBarMobileView", lpparam.classLoader, "init", new MethodHook() { @@ -183,22 +182,22 @@ protected void after(final MethodHookParam param) throws Throwable { Context mContext = mobileView.getContext(); Resources res = mContext.getResources(); int rightSpacing = (int) TypedValue.applyDimension( - TypedValue.COMPLEX_UNIT_DIP, - rightMargin * 0.5f, - res.getDisplayMetrics() + TypedValue.COMPLEX_UNIT_DIP, + rightMargin * 0.5f, + res.getDisplayMetrics() ); int leftSpacing = (int) TypedValue.applyDimension( - TypedValue.COMPLEX_UNIT_DIP, - leftMargin * 0.5f, - res.getDisplayMetrics() + TypedValue.COMPLEX_UNIT_DIP, + leftMargin * 0.5f, + res.getDisplayMetrics() ); mobileView.setPadding(leftSpacing, 0, rightSpacing, 0); View mMobile = (View) XposedHelpers.getObjectField(param.thisObject, "mMobile"); if (verticalOffset != 8) { float marginTop = TypedValue.applyDimension( - TypedValue.COMPLEX_UNIT_DIP, - (verticalOffset - 8) * 0.5f, - res.getDisplayMetrics() + TypedValue.COMPLEX_UNIT_DIP, + (verticalOffset - 8) * 0.5f, + res.getDisplayMetrics() ); FrameLayout mobileIcon = (FrameLayout) mMobile.getParent(); mobileIcon.setTranslationY(marginTop); @@ -207,9 +206,9 @@ protected void after(final MethodHookParam param) throws Throwable { View mSmallRoaming = (View) XposedHelpers.getObjectField(param.thisObject, "mSmallRoaming"); FrameLayout.LayoutParams layoutParams = (FrameLayout.LayoutParams) mMobile.getLayoutParams(); int mIconHeight = (int) TypedValue.applyDimension( - TypedValue.COMPLEX_UNIT_DIP, - 20 * iconScale / 10f, - res.getDisplayMetrics() + TypedValue.COMPLEX_UNIT_DIP, + 20 * iconScale / 10f, + res.getDisplayMetrics() ); if (layoutParams == null) { layoutParams = new FrameLayout.LayoutParams(-2, mIconHeight); diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/statusbar/HideBatteryIcon.kt b/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/statusbar/HideBatteryIcon.kt index 557e72aed1..18824a2d2c 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/statusbar/HideBatteryIcon.kt +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/statusbar/HideBatteryIcon.kt @@ -14,7 +14,7 @@ object HideBatteryIcon : BaseHook() { "updateResources", object : MethodHook() { override fun after(param: MethodHookParam?) { - //隐藏电池图标 + // 隐藏电池图标 if (mPrefsMap.getBoolean("system_ui_status_bar_battery_icon")) { (param?.thisObject?.getObjectFieldAs("mBatteryIconView"))?.visibility = View.GONE @@ -23,7 +23,7 @@ object HideBatteryIcon : BaseHook() { View.GONE } } - //隐藏电池百分号 + // 隐藏电池百分号 if (mPrefsMap.getBoolean("system_ui_status_bar_battery_percent") || mPrefsMap.getBoolean( "system_ui_status_bar_battery_percent_mark" ) @@ -31,7 +31,7 @@ object HideBatteryIcon : BaseHook() { (param?.thisObject?.getObjectFieldAs("mBatteryPercentMarkView"))?.textSize = 0F } - //隐藏电池内的百分比 + // 隐藏电池内的百分比 if (mPrefsMap.getBoolean("system_ui_status_bar_battery_percent")) { (param?.thisObject?.getObjectFieldAs("mBatteryPercentView"))?.textSize = 0F @@ -46,7 +46,7 @@ object HideBatteryIcon : BaseHook() { "updateChargeAndText", object : MethodHook() { override fun after(param: MethodHookParam?) { - //隐藏电池充电图标 + // 隐藏电池充电图标 if (mPrefsMap.getBoolean("system_ui_status_bar_battery_charging")) { (param?.thisObject?.getObjectFieldAs("mBatteryChargingInView"))?.visibility = View.GONE @@ -57,4 +57,4 @@ object HideBatteryIcon : BaseHook() { }) } -} \ No newline at end of file +} diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/statusbar/MobileNetwork.java b/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/statusbar/MobileNetwork.java index aa531aa9ff..7746d7f508 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/statusbar/MobileNetwork.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/statusbar/MobileNetwork.java @@ -21,20 +21,20 @@ public void init() { mHDController = findClassIfExists("com.android.systemui.statusbar.policy.HDController"); - findAndHookMethod(mStatusBarMobileView,"initViewState", mMobileIconState, new MethodHook() { + findAndHookMethod(mStatusBarMobileView, "initViewState", mMobileIconState, new MethodHook() { @Override protected void after(MethodHookParam param) throws Throwable { updateIconState(param, "mSmallHd", "system_ui_status_bar_icon_small_hd"); - updateIconState(param, "mVolte","system_ui_status_bar_icon_big_hd"); + updateIconState(param, "mVolte", "system_ui_status_bar_icon_big_hd"); updateIconState(param, "mMobileType", "system_ui_status_bar_icon_mobile_network_type"); } }); - findAndHookMethod(mStatusBarMobileView,"updateState", mMobileIconState, new MethodHook() { + findAndHookMethod(mStatusBarMobileView, "updateState", mMobileIconState, new MethodHook() { @Override protected void after(MethodHookParam param) throws Throwable { updateIconState(param, "mSmallHd", "system_ui_status_bar_icon_small_hd"); - updateIconState(param, "mVolte","system_ui_status_bar_icon_big_hd"); + updateIconState(param, "mVolte", "system_ui_status_bar_icon_big_hd"); updateIconState(param, "mMobileType", "system_ui_status_bar_icon_mobile_network_type"); } @@ -51,7 +51,7 @@ protected void before(MethodHookParam param) throws Throwable { }); - //信号 + // 信号 /*hookAllMethods("com.android.systemui.statusbar.StatusBarMobileView", "applyMobileState", new MethodHook() { @Override protected void after(MethodHookParam param) throws Throwable { diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/statusbar/MobileTypeSingleHook.java b/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/statusbar/MobileTypeSingleHook.java index d94be66582..106a1bc1db 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/statusbar/MobileTypeSingleHook.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/statusbar/MobileTypeSingleHook.java @@ -7,7 +7,9 @@ import android.view.ViewGroup; import android.widget.LinearLayout; import android.widget.TextView; + import com.sevtinge.cemiuiler.module.base.BaseHook; + import de.robv.android.xposed.XposedHelpers; public class MobileTypeSingleHook extends BaseHook { @@ -46,26 +48,26 @@ protected void after(final MethodHookParam param) throws Throwable { ViewGroup.MarginLayoutParams mlp = (ViewGroup.MarginLayoutParams) mMobileTypeSingle.getLayoutParams(); int leftMargin = mPrefsMap.getInt("system_ui_statusbar_indicator_left_margin", 7); float marginLeft = TypedValue.applyDimension( - TypedValue.COMPLEX_UNIT_DIP, - leftMargin * 0.5f, - res.getDisplayMetrics() + TypedValue.COMPLEX_UNIT_DIP, + leftMargin * 0.5f, + res.getDisplayMetrics() ); mlp.leftMargin = (int) marginLeft; int rightMargin = mPrefsMap.getInt("system_ui_statusbar_indicator_right_margin", 0); if (rightMargin > 0) { float marginRight = TypedValue.applyDimension( - TypedValue.COMPLEX_UNIT_DIP, - rightMargin * 0.5f, - res.getDisplayMetrics() + TypedValue.COMPLEX_UNIT_DIP, + rightMargin * 0.5f, + res.getDisplayMetrics() ); mlp.rightMargin = (int) marginRight; } int verticalOffset = mPrefsMap.getInt("system_ui_statusbar_mobile_type_vertical_offset", 8); if (verticalOffset != 8) { float marginTop = TypedValue.applyDimension( - TypedValue.COMPLEX_UNIT_DIP, - (verticalOffset - 8) * 0.5f, - res.getDisplayMetrics() + TypedValue.COMPLEX_UNIT_DIP, + (verticalOffset - 8) * 0.5f, + res.getDisplayMetrics() ); mlp.topMargin = (int) marginTop; } diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/statusbar/NotificationIconColumns.kt b/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/statusbar/NotificationIconColumns.kt index 91097f90e2..b0d7a0673d 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/statusbar/NotificationIconColumns.kt +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/statusbar/NotificationIconColumns.kt @@ -3,9 +3,8 @@ package com.sevtinge.cemiuiler.module.systemui.statusbar import com.github.kyuubiran.ezxhelper.ClassUtils.loadClass import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHook import com.github.kyuubiran.ezxhelper.finders.MethodFinder.`-Static`.methodFinder -import com.sevtinge.cemiuiler.utils.callMethod - import com.sevtinge.cemiuiler.module.base.BaseHook +import com.sevtinge.cemiuiler.utils.callMethod import com.sevtinge.cemiuiler.utils.setObjectField @@ -19,17 +18,17 @@ object NotificationIconColumns : BaseHook() { .filterByParamCount(1) .first().createHook { replace { - if (it.args[0] as Boolean) { - it.thisObject.setObjectField("MAX_DOTS", maxDotsNum) - it.thisObject.setObjectField("MAX_STATIC_ICONS", maxIconsNum) - it.thisObject.setObjectField("MAX_ICONS_ON_LOCKSCREEN", maxIconsNum) - } else { - it.thisObject.setObjectField("MAX_DOTS", 0) - it.thisObject.setObjectField("MAX_STATIC_ICONS", 0) - it.thisObject.setObjectField("MAX_ICONS_ON_LOCKSCREEN", 0) + if (it.args[0] as Boolean) { + it.thisObject.setObjectField("MAX_DOTS", maxDotsNum) + it.thisObject.setObjectField("MAX_STATIC_ICONS", maxIconsNum) + it.thisObject.setObjectField("MAX_ICONS_ON_LOCKSCREEN", maxIconsNum) + } else { + it.thisObject.setObjectField("MAX_DOTS", 0) + it.thisObject.setObjectField("MAX_STATIC_ICONS", 0) + it.thisObject.setObjectField("MAX_ICONS_ON_LOCKSCREEN", 0) + } + it.thisObject.callMethod("updateState") } - it.thisObject.callMethod("updateState") } - } } -} \ No newline at end of file +} diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/statusbar/SelectiveHideIconForAlarmClock.java b/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/statusbar/SelectiveHideIconForAlarmClock.java index 16e8b89a5f..382a7b8076 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/statusbar/SelectiveHideIconForAlarmClock.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/statusbar/SelectiveHideIconForAlarmClock.java @@ -19,7 +19,6 @@ import java.util.Locale; import java.util.TimeZone; -import de.robv.android.xposed.XposedBridge; import de.robv.android.xposed.XposedHelpers; public class SelectiveHideIconForAlarmClock extends BaseHook { @@ -147,7 +146,7 @@ public long getNextMIUIAlarmTime(Context context) { } public long getNextStockAlarmTime(Context context) { - AlarmManager alarmMgr = (AlarmManager)context.getSystemService(Context.ALARM_SERVICE); + AlarmManager alarmMgr = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE); if (alarmMgr == null) return 0; AlarmManager.AlarmClockInfo aci = alarmMgr.getNextAlarmClock(); return aci == null ? 0 : aci.getTriggerTime(); diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/statusbar/StatusBarIcon.java b/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/statusbar/StatusBarIcon.java index 7e1eb98080..518ee52892 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/statusbar/StatusBarIcon.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/statusbar/StatusBarIcon.java @@ -37,28 +37,28 @@ private static int checkSlot(String slotName) { int headset = mPrefsMap.getStringAsInt("system_ui_status_bar_icon_headset", 0); return switch (slotName) { - case "vpn" ->//vpn - isEnable(vpn) ? vpn : 0; - case "alarm_clock" ->//闹钟 - isEnable(alarmClock) ? alarmClock : 0; - case "nfc" ->//nfc - isEnable(nfc) ? nfc : 0; - case "zen" ->//勿扰模式 - isEnable(zen) ? zen : 0; - case "volume" ->//声音 - isEnable(volume) ? volume : 0; - case "wifi" ->//wifi - isEnable(wifi) ? wifi : 0; - case "wifi_slave" ->//辅助wifi - isEnable(wifi_slave) ? wifi_slave : 0; - case "airplane" ->//飞行模式 - isEnable(airplane) ? airplane : 0; - case "location" ->//位置信息 - isEnable(location) ? location : 0; - case "hotspot" ->//热点 - isEnable(hotspot) ? hotspot : 0; - case "headset" ->//耳机 - isEnable(headset) ? headset : 0; + case "vpn" ->// vpn + isEnable(vpn) ? vpn : 0; + case "alarm_clock" ->// 闹钟 + isEnable(alarmClock) ? alarmClock : 0; + case "nfc" ->// nfc + isEnable(nfc) ? nfc : 0; + case "zen" ->// 勿扰模式 + isEnable(zen) ? zen : 0; + case "volume" ->// 声音 + isEnable(volume) ? volume : 0; + case "wifi" ->// wifi + isEnable(wifi) ? wifi : 0; + case "wifi_slave" ->// 辅助wifi + isEnable(wifi_slave) ? wifi_slave : 0; + case "airplane" ->// 飞行模式 + isEnable(airplane) ? airplane : 0; + case "location" ->// 位置信息 + isEnable(location) ? location : 0; + case "hotspot" ->// 热点 + isEnable(hotspot) ? hotspot : 0; + case "headset" ->// 耳机 + isEnable(headset) ? headset : 0; default -> 0; }; } diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/statusbar/StatusBarIconPositionAdjust.java b/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/statusbar/StatusBarIconPositionAdjust.java index 384b888898..ce0e2a7a82 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/statusbar/StatusBarIconPositionAdjust.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/statusbar/StatusBarIconPositionAdjust.java @@ -206,8 +206,7 @@ protected void after(MethodHookParam param) throws Throwable { Object mDripNetworkSpeedView = XposedHelpers.getObjectField(param.thisObject, "mDripNetworkSpeedView"); XposedHelpers.callMethod(mDripNetworkSpeedView, "setBlocked", true); } - } - else { + } else { boolean dualRows = false; if (isMoveLeft && !dualRows) { View mDripStatusBarLeftStatusIconArea = (View) XposedHelpers.getObjectField(param.thisObject, "mDripStatusBarLeftStatusIconArea"); diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/statusbar/clock/TimeCustomization.kt b/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/statusbar/clock/TimeCustomization.kt index 3e3b610da8..a09ac27fbe 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/statusbar/clock/TimeCustomization.kt +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/statusbar/clock/TimeCustomization.kt @@ -6,7 +6,6 @@ import android.os.Build import android.os.Handler import android.provider.Settings import android.util.TypedValue -import android.view.Gravity import android.widget.TextView import com.github.kyuubiran.ezxhelper.ClassUtils.loadClass import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHook @@ -20,8 +19,8 @@ import java.lang.reflect.Method import java.text.SimpleDateFormat import java.util.* -object TimeCustomization : BaseHook(){ - //预设模式 +object TimeCustomization : BaseHook() { + // 预设模式 private val getMode = mPrefsMap.getStringAsInt("system_ui_statusbar_clock_mode", 0) private val getClockSize = mPrefsMap.getInt("system_ui_statusbar_clock_size", 0) private val getClockDoubleSize = mPrefsMap.getInt("system_ui_statusbar_clock_double_size", 0) @@ -35,7 +34,7 @@ object TimeCustomization : BaseHook(){ private val isDoubleHour = mPrefsMap.getBoolean("system_ui_statusbar_clock_hour_cn") private val isPeriod = mPrefsMap.getBoolean("system_ui_statusbar_clock_period") - //极客模式 + // 极客模式 private val getGeekClockSize = mPrefsMap.getInt("system_ui_statusbar_clock_size_geek", 0) private val getGeekFormat = mPrefsMap.getString("system_ui_statusbar_clock_editor", "HH:mm:ss") @@ -46,13 +45,13 @@ object TimeCustomization : BaseHook(){ @SuppressLint("SetTextI18n") override fun init() { val mClockClass = when { - Build.VERSION.SDK_INT == Build.VERSION_CODES.R -> loadClass("com.android.systemui.statusbar.policy.MiuiClock") - Build.VERSION.SDK_INT >= Build.VERSION_CODES.S -> loadClass("com.android.systemui.statusbar.views.MiuiClock") + Build.VERSION.SDK_INT == Build.VERSION_CODES.R -> loadClass("com.android.systemui.statusbar.policy.MiuiClock") + Build.VERSION.SDK_INT >= Build.VERSION_CODES.S -> loadClass("com.android.systemui.statusbar.views.MiuiClock") else -> null } when (getMode) { - //预设模式 + // 预设模式 1 -> { var c: Context? = null mClockClass?.constructorFinder()?.first { @@ -116,7 +115,7 @@ object TimeCustomization : BaseHook(){ } } } - //极客模式 + // 极客模式 2 -> { var c: Context? = null @@ -242,18 +241,23 @@ object TimeCustomization : BaseHook(){ "00", "01", "02", "03", "04", "05" -> { period = "凌晨" } + "06", "07", "08", "09", "10", "11" -> { period = "上午" } + "12" -> { period = "中午" } + "13", "14", "15", "16", "17" -> { period = "下午" } + "18" -> { period = "傍晚" } + "19", "20", "21", "22", "23" -> { period = "晚上" } @@ -277,36 +281,47 @@ object TimeCustomization : BaseHook(){ "23", "00" -> { doubleHour = "子时" } + "01", "02" -> { doubleHour = "丑时" } + "03", "04" -> { doubleHour = "寅时" } + "05", "06" -> { doubleHour = "卯时" } + "07", "08" -> { doubleHour = "辰时" } + "09", "10" -> { doubleHour = "巳时" } + "11", "12" -> { doubleHour = "午时" } + "13", "14" -> { doubleHour = "未时" } + "15", "16" -> { doubleHour = "申时" } + "17", "18" -> { doubleHour = "酉时" } + "19", "20" -> { doubleHour = "戌时" } + "21", "22" -> { doubleHour = "亥时" } diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/statusbar/clock/TimeStyle.kt b/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/statusbar/clock/TimeStyle.kt index 525a83fb52..a244d51d96 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/statusbar/clock/TimeStyle.kt +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/statusbar/clock/TimeStyle.kt @@ -65,10 +65,14 @@ object TimeStyle : BaseHook() { // 时钟边距调整 if (verticalOffset != 12) { val marginTop = - TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, (verticalOffset - 12) * 0.5f, res.displayMetrics) + TypedValue.applyDimension( + TypedValue.COMPLEX_UNIT_DIP, + (verticalOffset - 12) * 0.5f, + res.displayMetrics + ) textV.translationY = marginTop } } } } -} \ No newline at end of file +} diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/statusbar/layout/StatusBarLayout.kt b/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/statusbar/layout/StatusBarLayout.kt index b9f0851bbd..6f5247d5ae 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/statusbar/layout/StatusBarLayout.kt +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/statusbar/layout/StatusBarLayout.kt @@ -39,12 +39,12 @@ object StatusBarLayout : BaseHook() { var mCenterLayout: LinearLayout? var statusBar: ViewGroup? = null - //判断屏幕状态更新布局 mode: 1正常布局 2居中布局 + // 判断屏幕状态更新布局 mode: 1正常布局 2居中布局 fun updateLayout(context: Context, mode: Int) { when (mode) { 1 -> { val mConfiguration: Configuration = context.resources.configuration - if (mConfiguration.orientation == Configuration.ORIENTATION_PORTRAIT) { //横屏 + if (mConfiguration.orientation == Configuration.ORIENTATION_PORTRAIT) { // 横屏 statusBar?.setPadding( statusBarLeft, statusBarTop, @@ -56,11 +56,11 @@ object StatusBarLayout : BaseHook() { 2 -> { val mConfiguration: Configuration = context.resources.configuration - if (mConfiguration.orientation == Configuration.ORIENTATION_PORTRAIT) { //横屏 + if (mConfiguration.orientation == Configuration.ORIENTATION_PORTRAIT) { // 横屏 mLeftLayout?.setPadding(statusBarLeft, 0, 0, 0) mRightLayout?.setPadding(0, 0, statusBarRight, 0) statusBar?.setPadding(0, statusBarTop, 0, statusBarBottom) - } else { //竖屏 + } else { // 竖屏 mLeftLayout?.setPadding(0, 0, 0, 0) mRightLayout?.setPadding(0, 0, 0, 0) } @@ -68,7 +68,7 @@ object StatusBarLayout : BaseHook() { } } - //判断是否开启挖孔兼容模式 + // 判断是否开启挖孔兼容模式 if (isCompatibilityMode) { loadClass("com.android.systemui.ScreenDecorations").methodFinder().first { name == "boundsFromDirection" && parameterCount == 3 && isStatic @@ -79,9 +79,9 @@ object StatusBarLayout : BaseHook() { } } - //修改对应布局 + // 修改对应布局 when (getMode) { - //默认 + // 默认 0 -> { collapsedStatusBarFragmentClass.methodFinder() .filterByName("onViewCreated") @@ -120,7 +120,7 @@ object StatusBarLayout : BaseHook() { } - //兼容模式 + // 兼容模式 phoneStatusBarView.methodFinder() .filterByName("updateLayoutForCutout") .first().createHook { @@ -132,7 +132,7 @@ object StatusBarLayout : BaseHook() { } } } - //时钟居中 + // 时钟居中 1 -> { collapsedStatusBarFragmentClass.methodFinder() .filterByName("onViewCreated") @@ -200,7 +200,7 @@ object StatusBarLayout : BaseHook() { notificationIconAreaInner.layoutParams = fullscreenNotificationIconAreaLp - //增加一个左对齐布局 + // 增加一个左对齐布局 mLeftLayout = LinearLayout(context) val leftLp: LinearLayout.LayoutParams = LinearLayout.LayoutParams( 0, LinearLayout.LayoutParams.MATCH_PARENT, 1.0f @@ -208,7 +208,7 @@ object StatusBarLayout : BaseHook() { mLeftLayout!!.layoutParams = leftLp mLeftLayout!!.gravity = Gravity.START or Gravity.CENTER_VERTICAL - //增加一个居中布局 + // 增加一个居中布局 mCenterLayout = LinearLayout(context) val centerLp: LinearLayout.LayoutParams = LinearLayout.LayoutParams( LinearLayout.LayoutParams.WRAP_CONTENT, @@ -238,17 +238,17 @@ object StatusBarLayout : BaseHook() { if (isCompatibilityMode) { - /* val customLeftMargin = - mPrefsMap.getStringAsInt("status_bar_left_margin", 0) - if (customLeftMargin != 0) { - statusBarLeft = customLeftMargin - } - - val customRightMargin = - mPrefsMap.getStringAsInt("status_bar_right_margin", 0) - if (customRightMargin != 0) { - statusBarRight = customRightMargin - }*/ + /* val customLeftMargin = + mPrefsMap.getStringAsInt("status_bar_left_margin", 0) + if (customLeftMargin != 0) { + statusBarLeft = customLeftMargin + } + + val customRightMargin = + mPrefsMap.getStringAsInt("status_bar_right_margin", 0) + if (customRightMargin != 0) { + statusBarRight = customRightMargin + }*/ updateLayout(context, 2) } } @@ -266,7 +266,7 @@ object StatusBarLayout : BaseHook() { } } } - //时钟居右 + // 时钟居右 2 -> { collapsedStatusBarFragmentClass.methodFinder() .filterByName("onViewCreated") @@ -278,7 +278,7 @@ object StatusBarLayout : BaseHook() { val context: Context = miuiPhoneStatusBarView.context val res: Resources = miuiPhoneStatusBarView.resources - //组件ID + // 组件ID val statusBarId: Int = res.getIdentifier("status_bar", "id", "com.android.systemui") val clockId: Int = @@ -286,13 +286,13 @@ object StatusBarLayout : BaseHook() { val batteryId: Int = res.getIdentifier("battery", "id", "com.android.systemui") - //查找组件 + // 查找组件 statusBar = miuiPhoneStatusBarView.findViewById(statusBarId) if (statusBar == null) return@after val clock: TextView = miuiPhoneStatusBarView.findViewById(clockId) val battery: ViewGroup = miuiPhoneStatusBarView.findViewById(batteryId) - //新建布局 + // 新建布局 val rightLp = LinearLayout.LayoutParams( LinearLayout.LayoutParams.WRAP_CONTENT, LinearLayout.LayoutParams.MATCH_PARENT @@ -303,7 +303,7 @@ object StatusBarLayout : BaseHook() { it.layoutParams = rightLp } - //添加布局与组件 + // 添加布局与组件 battery.addView(mRightLayout) (clock.parent as ViewGroup).removeView(clock) mRightLayout!!.addView(clock) @@ -332,7 +332,7 @@ object StatusBarLayout : BaseHook() { } - //兼容模式 + // 兼容模式 phoneStatusBarView.methodFinder() .filterByName("updateLayoutForCutout") .first().createHook { @@ -344,7 +344,7 @@ object StatusBarLayout : BaseHook() { } } } - //时钟居中+图标居左 + // 时钟居中+图标居左 3 -> { collapsedStatusBarFragmentClass.methodFinder() .filterByName("onViewCreated") @@ -443,7 +443,7 @@ object StatusBarLayout : BaseHook() { View.LAYOUT_DIRECTION_RTL - //增加一个左对齐布局 + // 增加一个左对齐布局 mLeftLayout = LinearLayout(context) val leftLp: LinearLayout.LayoutParams = LinearLayout.LayoutParams( 0, LinearLayout.LayoutParams.MATCH_PARENT, 1.0f @@ -451,7 +451,7 @@ object StatusBarLayout : BaseHook() { mLeftLayout!!.layoutParams = leftLp mLeftLayout!!.gravity = Gravity.START or Gravity.CENTER_VERTICAL - //增加一个居中布局 + // 增加一个居中布局 mCenterLayout = LinearLayout(context) val centerLp: LinearLayout.LayoutParams = LinearLayout.LayoutParams( LinearLayout.LayoutParams.WRAP_CONTENT, @@ -460,7 +460,7 @@ object StatusBarLayout : BaseHook() { mCenterLayout!!.layoutParams = centerLp mCenterLayout!!.gravity = Gravity.CENTER or Gravity.CENTER_VERTICAL - //增加一个右布局 + // 增加一个右布局 mRightLayout = LinearLayout(context) val rightLp: LinearLayout.LayoutParams = LinearLayout.LayoutParams( 0, LinearLayout.LayoutParams.MATCH_PARENT, 1.0f @@ -508,7 +508,7 @@ object StatusBarLayout : BaseHook() { } } } - //兼容模式 + // 兼容模式 phoneStatusBarView.methodFinder() .filterByName("updateLayoutForCutout") .first().createHook { @@ -520,7 +520,7 @@ object StatusBarLayout : BaseHook() { } } - //解决重叠 + // 解决重叠 loadClass("com.android.systemui.statusbar.phone.MiuiCollapsedStatusBarFragment").methodFinder() .filterByName("showClock") .filterByParamTypes(Boolean::class.java) @@ -533,7 +533,7 @@ object StatusBarLayout : BaseHook() { res.getIdentifier("status_bar", "id", "com.android.systemui") val statusBar1 = miuiPhoneStatusBarView.findViewById(statusBarId) - //非锁屏下整个状态栏布局 + // 非锁屏下整个状态栏布局 val keyguardMgr = statusBar1.context.getSystemService(Context.KEYGUARD_SERVICE) as KeyguardManager if (keyguardMgr.isKeyguardLocked) { @@ -554,4 +554,4 @@ object StatusBarLayout : BaseHook() { } } } -} \ No newline at end of file +} diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/statusbar/network/NetworkSpeed.kt b/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/statusbar/network/NetworkSpeed.kt index 5707288a64..376972c586 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/statusbar/network/NetworkSpeed.kt +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/statusbar/network/NetworkSpeed.kt @@ -52,7 +52,7 @@ object NetworkSpeed : BaseHook() { return Pair(tx, rx) } -// 网速计算与隐藏相关 + // 网速计算与隐藏相关 @SuppressLint("DefaultLocale") private fun humanReadableByteCount(ctx: Context, bytes: Long): String { return try { @@ -85,9 +85,9 @@ object NetworkSpeed : BaseHook() { override fun init() { // 双排网速相关 - val networkClass = when{ - Build.VERSION.SDK_INT == Build.VERSION_CODES.R -> "com.android.systemui.statusbar.NetworkSpeedController" - Build.VERSION.SDK_INT >= Build.VERSION_CODES.S -> "com.android.systemui.statusbar.policy.NetworkSpeedController" + val networkClass = when { + Build.VERSION.SDK_INT == Build.VERSION_CODES.R -> "com.android.systemui.statusbar.NetworkSpeedController" + Build.VERSION.SDK_INT >= Build.VERSION_CODES.S -> "com.android.systemui.statusbar.policy.NetworkSpeedController" else -> null } @@ -168,27 +168,40 @@ object NetworkSpeed : BaseHook() { txarrow = if (txSpeed < lowLevel) "△" else "▲" rxarrow = if (rxSpeed < lowLevel) "▽" else "▼" } + 3 -> { txarrow = if (txSpeed < lowLevel) " ▵" else " ▴" rxarrow = if (rxSpeed < lowLevel) " ▿" else " ▾" } + 4 -> { txarrow = if (txSpeed < lowLevel) " ☖" else " ☗" rxarrow = if (rxSpeed < lowLevel) " ⛉" else " ⛊" } + 5 -> { txarrow = if (txSpeed < lowLevel) "↑" else "↑" rxarrow = if (rxSpeed < lowLevel) "↓" else "↓" } + 6 -> { txarrow = if (txSpeed < lowLevel) "⇧" else "⇧" rxarrow = if (rxSpeed < lowLevel) "⇩" else "⇩" } } - val tx = if (hideLow && txSpeed < lowLevel) "" else humanReadableByteCount(mContext, txSpeed) + txarrow - val rx = if (hideLow && rxSpeed < lowLevel) "" else humanReadableByteCount(mContext, rxSpeed) + rxarrow + val tx = if (hideLow && txSpeed < lowLevel) "" else humanReadableByteCount( + mContext, + txSpeed + ) + txarrow + val rx = if (hideLow && rxSpeed < lowLevel) "" else humanReadableByteCount( + mContext, + rxSpeed + ) + rxarrow val ax = humanReadableByteCount(mContext, newTxBytesFixed + newRxBytesFixed) - if (mPrefsMap.getBoolean("system_ui_statusbar_network_speed_show_up_down") && !mPrefsMap.getBoolean("system_ui_statusbar_network_speed_fakedualrow")) { + if (mPrefsMap.getBoolean("system_ui_statusbar_network_speed_show_up_down") && !mPrefsMap.getBoolean( + "system_ui_statusbar_network_speed_fakedualrow" + ) + ) { if (hideLow && (txSpeed + rxSpeed) < lowLevel) { param.args[0] = "".trimIndent() } else { @@ -215,4 +228,4 @@ object NetworkSpeed : BaseHook() { ) } } -} \ No newline at end of file +} diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/statusbar/network/NetworkSpeedSec.kt b/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/statusbar/network/NetworkSpeedSec.kt index 410ffeb2c6..0c2d9025f4 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/statusbar/network/NetworkSpeedSec.kt +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/statusbar/network/NetworkSpeedSec.kt @@ -5,7 +5,7 @@ import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHook import com.github.kyuubiran.ezxhelper.finders.MethodFinder.`-Static`.methodFinder import com.sevtinge.cemiuiler.module.base.BaseHook -//隐藏网速单位 +// 隐藏网速单位 object NetworkSpeedSec : BaseHook() { override fun init() { loadClass("com.android.systemui.statusbar.views.NetworkSpeedView").methodFinder().first { @@ -23,4 +23,4 @@ object NetworkSpeedSec : BaseHook() { } } } -} \ No newline at end of file +} diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/statusbar/network/NetworkSpeedSpacing.kt b/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/statusbar/network/NetworkSpeedSpacing.kt index 3963ba55fa..a8ab24d7f4 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/statusbar/network/NetworkSpeedSpacing.kt +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/statusbar/network/NetworkSpeedSpacing.kt @@ -6,22 +6,22 @@ import com.sevtinge.cemiuiler.utils.Helpers object NetworkSpeedSpacing : BaseHook() { override fun init() { - //网速更新间隔 + // 网速更新间隔 if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) { // Android12+ 可用 - Helpers.findAndHookMethod( - "com.android.systemui.statusbar.policy.NetworkSpeedController", lpparam.classLoader, - "postUpdateNetworkSpeedDelay", - Long::class.javaPrimitiveType, - object : MethodHook() { - override fun before(param: MethodHookParam) { - val originInterval = param.args[0] as Long - if (originInterval == 4000L) { - val newInterval = - mPrefsMap.getInt("system_ui_statusbar_network_speed_update_spacing", 4) * 1000L - param.args[0] = newInterval + Helpers.findAndHookMethod( + "com.android.systemui.statusbar.policy.NetworkSpeedController", lpparam.classLoader, + "postUpdateNetworkSpeedDelay", + Long::class.javaPrimitiveType, + object : MethodHook() { + override fun before(param: MethodHookParam) { + val originInterval = param.args[0] as Long + if (originInterval == 4000L) { + val newInterval = + mPrefsMap.getInt("system_ui_statusbar_network_speed_update_spacing", 4) * 1000L + param.args[0] = newInterval + } } - } - }) + }) } if (Build.VERSION.SDK_INT == Build.VERSION_CODES.R) { // Android11 可用 @@ -41,4 +41,4 @@ object NetworkSpeedSpacing : BaseHook() { }) } } -} \ No newline at end of file +} diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/statusbar/network/NetworkSpeedUnit.kt b/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/statusbar/network/NetworkSpeedUnit.kt index dcb418d656..6e054870cb 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/statusbar/network/NetworkSpeedUnit.kt +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/statusbar/network/NetworkSpeedUnit.kt @@ -12,7 +12,7 @@ object NetworkSpeedUnit : BaseHook() { "com.android.systemui.statusbar.views.NetworkSpeedView", object : MethodHook() { override fun after(param: MethodHookParam) { - //值和单位双排显示 + 上下行网速双排显示 + // 值和单位双排显示 + 上下行网速双排显示 val doubleLine = (mPrefsMap.getBoolean("system_ui_statusbar_network_speed_detailed") && mPrefsMap.getBoolean("system_ui_statusbar_network_speed_show_up_down")) val dualRow = @@ -24,7 +24,7 @@ object NetworkSpeedUnit : BaseHook() { val fontSizeEnable: Boolean = mPrefsMap.getBoolean("system_ui_statusbar_network_speed_font_size_enable") - //网速字体大小调整 + // 网速字体大小调整 if (fontSizeEnable) { try { if (doubleLine || dualRow) { @@ -36,13 +36,13 @@ object NetworkSpeedUnit : BaseHook() { logE(e) } } - //网速加粗 + // 网速加粗 if (mPrefsMap.getBoolean("system_ui_statusbar_network_speed_bold")) { meter.typeface = Typeface.DEFAULT_BOLD } val res = meter.resources - //左侧间距 + // 左侧间距 var leftMargin = mPrefsMap.getInt("system_ui_statusbar_network_speed_left_margin", 0) leftMargin = TypedValue.applyDimension( @@ -50,7 +50,7 @@ object NetworkSpeedUnit : BaseHook() { leftMargin * 0.5f, res.displayMetrics ).toInt() - //右侧间距 + // 右侧间距 var rightMargin = mPrefsMap.getInt("system_ui_statusbar_network_speed_right_margin", 0) rightMargin = TypedValue.applyDimension( @@ -58,7 +58,7 @@ object NetworkSpeedUnit : BaseHook() { rightMargin * 0.5f, res.displayMetrics ).toInt() - //上下偏移量 + // 上下偏移量 var topMargin = 0 val verticalOffset = mPrefsMap.getInt("system_ui_statusbar_network_speed_vertical_offset", 8) @@ -72,7 +72,7 @@ object NetworkSpeedUnit : BaseHook() { } meter.setPaddingRelative(leftMargin, topMargin, rightMargin, 0) - //水平对齐 + // 水平对齐 when (mPrefsMap.getStringAsInt("system_ui_statusbar_network_speed_align", 1)) { 2 -> meter.textAlignment = View.TEXT_ALIGNMENT_TEXT_START 3 -> meter.textAlignment = View.TEXT_ALIGNMENT_CENTER @@ -96,4 +96,4 @@ object NetworkSpeedUnit : BaseHook() { } ) } -} \ No newline at end of file +} diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/statusbar/network/StatusBarNoNetSpeedSep.kt b/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/statusbar/network/StatusBarNoNetSpeedSep.kt index 38e9122ff5..a78fd3d718 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/statusbar/network/StatusBarNoNetSpeedSep.kt +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/statusbar/network/StatusBarNoNetSpeedSep.kt @@ -10,12 +10,13 @@ import de.robv.android.xposed.XposedHelpers object StatusBarNoNetSpeedSep : BaseHook() { override fun init() { - loadClass("com.android.systemui.statusbar.views.NetworkSpeedSplitter", lpparam.classLoader).methodFinder().first { - name == "updateVisibility" - }.createHook { + loadClass("com.android.systemui.statusbar.views.NetworkSpeedSplitter", lpparam.classLoader).methodFinder() + .first { + name == "updateVisibility" + }.createHook { before { XposedHelpers.setObjectField(it.thisObject, "mNetworkSpeedVisibility", View.GONE) } } } -} \ No newline at end of file +} diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/statusbar/network/s/NetworkSpeedWidth.kt b/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/statusbar/network/s/NetworkSpeedWidth.kt index e9a5e31212..2af753f675 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/statusbar/network/s/NetworkSpeedWidth.kt +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/systemui/statusbar/network/s/NetworkSpeedWidth.kt @@ -7,7 +7,7 @@ import de.robv.android.xposed.XposedHelpers object NetworkSpeedWidth : BaseHook() { override fun init() { - //固定宽度以防相邻元素左右防抖 + // 固定宽度以防相邻元素左右防抖 if (mPrefsMap.getInt("system_ui_statusbar_network_speed_fixedcontent_width", 10) > 10) { Helpers.hookAllMethods( "com.android.systemui.statusbar.views.NetworkSpeedView", @@ -24,4 +24,4 @@ object NetworkSpeedWidth : BaseHook() { ) } } -} \ No newline at end of file +} diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/thememanager/DisableThemeAd.java b/app/src/main/java/com/sevtinge/cemiuiler/module/thememanager/DisableThemeAd.java index a9f3bb0142..11d29afe51 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/thememanager/DisableThemeAd.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/thememanager/DisableThemeAd.java @@ -32,14 +32,14 @@ protected void before(MethodHookParam param) throws Throwable { public void initZygote() { - hookAllMethods(DrmManager.class, "isSupportAd",new MethodHook() { + hookAllMethods(DrmManager.class, "isSupportAd", new MethodHook() { @Override protected void before(MethodHookParam param) throws Throwable { param.setResult(false); } }); - hookAllMethods(DrmManager.class, "setSupportAd",new MethodHook() { + hookAllMethods(DrmManager.class, "setSupportAd", new MethodHook() { @Override protected void before(MethodHookParam param) throws Throwable { param.args[1] = false; diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/thememanager/DisableThemeAdNew.kt b/app/src/main/java/com/sevtinge/cemiuiler/module/thememanager/DisableThemeAdNew.kt index e478c837c5..64c183e0f4 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/thememanager/DisableThemeAdNew.kt +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/thememanager/DisableThemeAdNew.kt @@ -1,6 +1,5 @@ package com.sevtinge.cemiuiler.module.thememanager -import com.sevtinge.cemiuiler.module.base.BaseHook import android.view.View import android.widget.FrameLayout import com.github.kyuubiran.ezxhelper.ClassUtils.loadClass @@ -9,6 +8,7 @@ import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHooks import com.github.kyuubiran.ezxhelper.Log import com.github.kyuubiran.ezxhelper.finders.ConstructorFinder.`-Static`.constructorFinder import com.github.kyuubiran.ezxhelper.finders.MethodFinder.`-Static`.methodFinder +import com.sevtinge.cemiuiler.module.base.BaseHook import miui.drm.DrmManager class DisableThemeAdNew : BaseHook() { @@ -65,4 +65,4 @@ class DisableThemeAdNew : BaseHook() { } } -} \ No newline at end of file +} diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/thememanager/EnableFoldTheme.java b/app/src/main/java/com/sevtinge/cemiuiler/module/thememanager/EnableFoldTheme.java index 0a5bc501af..70b60d5e0a 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/thememanager/EnableFoldTheme.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/thememanager/EnableFoldTheme.java @@ -12,7 +12,7 @@ public void init() { findAndHookMethod("com.android.thememanager.ThemeApplication", "onCreate", new MethodHook() { @Override protected void before(MethodHookParam param) throws Throwable { - XposedHelpers.setStaticObjectField(findClassIfExists("android.os.Build"),"DEVICE", "zizhan"); + XposedHelpers.setStaticObjectField(findClassIfExists("android.os.Build"), "DEVICE", "zizhan"); } }); diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/thememanager/EnablePadTheme.java b/app/src/main/java/com/sevtinge/cemiuiler/module/thememanager/EnablePadTheme.java index 55508a1822..95cde6965a 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/thememanager/EnablePadTheme.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/thememanager/EnablePadTheme.java @@ -2,7 +2,6 @@ import com.sevtinge.cemiuiler.module.base.BaseHook; -import de.robv.android.xposed.XC_MethodReplacement; import de.robv.android.xposed.XposedHelpers; public class EnablePadTheme extends BaseHook { @@ -17,7 +16,7 @@ public void init() { findAndHookMethod("com.android.thememanager.ThemeApplication", "onCreate", new MethodHook() { @Override protected void before(MethodHookParam param) throws Throwable { - XposedHelpers.setStaticBooleanField(findClassIfExists("miui.os.Build"),"IS_TABLET", true); + XposedHelpers.setStaticBooleanField(findClassIfExists("miui.os.Build"), "IS_TABLET", true); } }); diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/thememanager/ThemeCrack.java b/app/src/main/java/com/sevtinge/cemiuiler/module/thememanager/ThemeCrack.java index 7f48718c94..cae9439568 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/thememanager/ThemeCrack.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/thememanager/ThemeCrack.java @@ -1,7 +1,7 @@ package com.sevtinge.cemiuiler.module.thememanager; import com.sevtinge.cemiuiler.module.base.BaseHook; -import de.robv.android.xposed.XposedBridge; + import de.robv.android.xposed.XposedHelpers; public class ThemeCrack extends BaseHook { @@ -18,33 +18,33 @@ protected void before(MethodHookParam param) throws Throwable { } catch (Exception e) { log("Hook method com.android.thememanager.basemodule.resource.model.Resource.isAuthorizedResource failed. " + e); } - try{ - hookAllMethods("com.android.thememanager.basemodule.resource.model.Resource", "isProductBought", new MethodHook() { - @Override - protected void before(MethodHookParam param) throws Throwable { - param.setResult(false); - } - }); + try { + hookAllMethods("com.android.thememanager.basemodule.resource.model.Resource", "isProductBought", new MethodHook() { + @Override + protected void before(MethodHookParam param) throws Throwable { + param.setResult(false); + } + }); } catch (Exception e) { log("Hook method com.android.thememanager.basemodule.resource.model.Resource.isProductBought failed. " + e); } - try{ - hookAllMethods("com.android.thememanager.detail.theme.model.OnlineResourceDetail", "toResource", new MethodHook() { - @Override - protected void after(MethodHookParam param) throws Throwable { - XposedHelpers.setBooleanField(param.thisObject, "bought", true); - } - }); + try { + hookAllMethods("com.android.thememanager.detail.theme.model.OnlineResourceDetail", "toResource", new MethodHook() { + @Override + protected void after(MethodHookParam param) throws Throwable { + XposedHelpers.setBooleanField(param.thisObject, "bought", true); + } + }); } catch (Exception e) { log("Hook method com.android.thememanager.detail.theme.model.OnlineResourceDetail.toResource failed. " + e); } - try{ - hookAllMethods("com.miui.maml.widget.edit.MamlutilKt", "themeManagerSupportPaidWidget", new MethodHook() { - @Override - protected void after(MethodHookParam param) throws Throwable { - param.setResult(false); - } - }); + try { + hookAllMethods("com.miui.maml.widget.edit.MamlutilKt", "themeManagerSupportPaidWidget", new MethodHook() { + @Override + protected void after(MethodHookParam param) throws Throwable { + param.setResult(false); + } + }); } catch (Exception e) { log("Hook method com.miui.maml.widget.edit.MamlutilKt.themeManagerSupportPaidWidget failed. " + e); } diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/thememanager/ThemeCrackNew.kt b/app/src/main/java/com/sevtinge/cemiuiler/module/thememanager/ThemeCrackNew.kt index c3bd909614..020be6b801 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/thememanager/ThemeCrackNew.kt +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/thememanager/ThemeCrackNew.kt @@ -42,7 +42,7 @@ class ThemeCrackNew : BaseHook() { val drmResult = mThemeManagerResultMethodsMap["DrmResult"]!! for (descriptor in drmResult) { try { - //val filterManager: Method = descriptor.getMethodInstance(lpparam.classLoader) + // val filterManager: Method = descriptor.getMethodInstance(lpparam.classLoader) val drmResultMethod = descriptor.getMethodInstance(lpparam.classLoader) log("DrmResult method is $drmResultMethod") drmResultMethod.createHook { @@ -65,7 +65,7 @@ class ThemeCrackNew : BaseHook() { val largeIcon = mThemeManagerResultMethodsMap["LargeIcon"]!! for (descriptor in largeIcon) { try { - //val filterManager: Method = descriptor.getMethodInstance(lpparam.classLoader) + // val filterManager: Method = descriptor.getMethodInstance(lpparam.classLoader) val largeIconMethod = descriptor.getMethodInstance(lpparam.classLoader) log("largeIcon method is $largeIconMethod") largeIconMethod.createHook { diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/thememanager/ThemeManagerDexKit.java b/app/src/main/java/com/sevtinge/cemiuiler/module/thememanager/ThemeManagerDexKit.java index bc0ff9ac2c..1075a66b0f 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/thememanager/ThemeManagerDexKit.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/thememanager/ThemeManagerDexKit.java @@ -1,14 +1,15 @@ package com.sevtinge.cemiuiler.module.thememanager; import com.sevtinge.cemiuiler.module.base.BaseHook; + +import java.util.List; +import java.util.Map; + import io.luckypray.dexkit.DexKitBridge; import io.luckypray.dexkit.builder.BatchFindArgs; import io.luckypray.dexkit.descriptor.member.DexMethodDescriptor; import io.luckypray.dexkit.enums.MatchType; -import java.util.List; -import java.util.Map; - public class ThemeManagerDexKit extends BaseHook { public static Map> mThemeManagerResultMethodsMap; @@ -23,16 +24,16 @@ public void init() { return; } mThemeManagerResultMethodsMap = - bridge.batchFindMethodsUsingStrings( - BatchFindArgs.builder() - .addQuery("DrmResult", List.of("theme", "ThemeManagerTag", "/system")) - .addQuery("LargeIcon", List.of("apply failed", "/data/system/theme/large_icons/", "default_large_icon_product_id")) - .matchType(MatchType.CONTAINS) - .build() - ); + bridge.batchFindMethodsUsingStrings( + BatchFindArgs.builder() + .addQuery("DrmResult", List.of("theme", "ThemeManagerTag", "/system")) + .addQuery("LargeIcon", List.of("apply failed", "/data/system/theme/large_icons/", "default_large_icon_product_id")) + .matchType(MatchType.CONTAINS) + .build() + ); } catch (Throwable e) { e.printStackTrace(); } bridge.close(); } -} \ No newline at end of file +} diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/tsmclient/AutoNfc.kt b/app/src/main/java/com/sevtinge/cemiuiler/module/tsmclient/AutoNfc.kt index 4765a89134..d869c05051 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/tsmclient/AutoNfc.kt +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/tsmclient/AutoNfc.kt @@ -6,10 +6,10 @@ import android.content.res.XModuleResources import android.nfc.NfcAdapter import android.widget.Toast import com.github.kyuubiran.ezxhelper.ClassUtils.loadClass -import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHook -import com.github.kyuubiran.ezxhelper.finders.MethodFinder.`-Static`.methodFinder import com.github.kyuubiran.ezxhelper.EzXHelper +import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHook import com.github.kyuubiran.ezxhelper.finders.FieldFinder.`-Static`.fieldFinder +import com.github.kyuubiran.ezxhelper.finders.MethodFinder.`-Static`.methodFinder import com.sevtinge.cemiuiler.R import com.sevtinge.cemiuiler.module.base.BaseHook import com.sevtinge.cemiuiler.module.base.BaseXposedInit.mModulePath @@ -57,9 +57,19 @@ object AutoNfc : BaseHook() { } fun initResource(resparam: XC_InitPackageResources.InitPackageResourcesParam) { - val moduleRes = XModuleResources.createInstance(mModulePath,resparam.res) - resparam.res.setReplacement("com.miui.tsmclient", "string", "nfc_off_hint", moduleRes.fwd(R.string.tsmclient_nfc_turning_on)) - resparam.res.setReplacement("com.miui.tsmclient", "string", "immediately_open", moduleRes.fwd(R.string.tsmclient_nfc_turn_on_manually)) + val moduleRes = XModuleResources.createInstance(mModulePath, resparam.res) + resparam.res.setReplacement( + "com.miui.tsmclient", + "string", + "nfc_off_hint", + moduleRes.fwd(R.string.tsmclient_nfc_turning_on) + ) + resparam.res.setReplacement( + "com.miui.tsmclient", + "string", + "immediately_open", + moduleRes.fwd(R.string.tsmclient_nfc_turn_on_manually) + ) } private suspend fun waitNFCEnable(context: Context, nfcAdapter: NfcAdapter) { @@ -69,4 +79,4 @@ object AutoNfc : BaseHook() { Toast.makeText(context, R.string.tsmclient_nfc_turn_on_failed, Toast.LENGTH_SHORT).show() } } -} \ No newline at end of file +} diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/updater/DeviceModify.kt b/app/src/main/java/com/sevtinge/cemiuiler/module/updater/DeviceModify.kt index d93533e73f..dc11c81379 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/updater/DeviceModify.kt +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/updater/DeviceModify.kt @@ -4,7 +4,6 @@ import com.sevtinge.cemiuiler.module.base.BaseHook import com.sevtinge.cemiuiler.module.updater.UpdaterDexKit.mUpdaterResultMethodsMap import com.sevtinge.cemiuiler.utils.hookBeforeMethod import de.robv.android.xposed.XposedBridge -import io.luckypray.dexkit.DexKitBridge import java.lang.reflect.Method object DeviceModify : BaseHook() { @@ -42,4 +41,4 @@ object DeviceModify : BaseHook() { XposedBridge.log("Cemiuiler: DeviceModify (Updater) dexkit hook failed by $e") } } -} \ No newline at end of file +} diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/updater/UpdaterDexKit.java b/app/src/main/java/com/sevtinge/cemiuiler/module/updater/UpdaterDexKit.java index d5883070ea..afdb1265c1 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/updater/UpdaterDexKit.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/updater/UpdaterDexKit.java @@ -1,14 +1,15 @@ package com.sevtinge.cemiuiler.module.updater; import com.sevtinge.cemiuiler.module.base.BaseHook; + +import java.util.List; +import java.util.Map; + import io.luckypray.dexkit.DexKitBridge; import io.luckypray.dexkit.builder.BatchFindArgs; import io.luckypray.dexkit.descriptor.member.DexMethodDescriptor; import io.luckypray.dexkit.enums.MatchType; -import java.util.List; -import java.util.Map; - public class UpdaterDexKit extends BaseHook { public static Map> mUpdaterResultMethodsMap; @@ -23,15 +24,15 @@ public void init() { return; } mUpdaterResultMethodsMap = - bridge.batchFindMethodsUsingStrings( - BatchFindArgs.builder() - .addQuery("SystemProperties", List.of("android.os.SystemProperties", "get", "get e")) - .matchType(MatchType.CONTAINS) - .build() - ); + bridge.batchFindMethodsUsingStrings( + BatchFindArgs.builder() + .addQuery("SystemProperties", List.of("android.os.SystemProperties", "get", "get e")) + .matchType(MatchType.CONTAINS) + .build() + ); } catch (Throwable e) { e.printStackTrace(); } bridge.close(); } -} \ No newline at end of file +} diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/updater/VersionCodeModify.java b/app/src/main/java/com/sevtinge/cemiuiler/module/updater/VersionCodeModify.java index 1e0af7b9aa..a89f6e1c86 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/updater/VersionCodeModify.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/updater/VersionCodeModify.java @@ -19,9 +19,9 @@ public void init() { findAndHookMethod(mApplication, "onCreate", new MethodHook() { @Override protected void before(MethodHookParam param) throws Throwable { - String mVersionCode = mPrefsMap.getString("various_updater_miui_version","V14.0.22.11.26.DEV"); + String mVersionCode = mPrefsMap.getString("various_updater_miui_version", "V14.0.22.11.26.DEV"); if (!TextUtils.isEmpty(mVersionCode)) { - XposedHelpers.setStaticObjectField(Build.VERSION.class,"INCREMENTAL", mVersionCode); + XposedHelpers.setStaticObjectField(Build.VERSION.class, "INCREMENTAL", mVersionCode); } } }); diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/various/DialogBlur.java b/app/src/main/java/com/sevtinge/cemiuiler/module/various/DialogBlur.java index c5afee5a1a..3b2217a709 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/various/DialogBlur.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/various/DialogBlur.java @@ -13,7 +13,7 @@ public class DialogBlur extends BaseHook { @Override public void init() { - hookAllMethods(mDialogCls,"installContent",new MethodHook() { + hookAllMethods(mDialogCls, "installContent", new MethodHook() { @Override protected void after(MethodHookParam param) throws Throwable { diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/various/DialogCustom.java b/app/src/main/java/com/sevtinge/cemiuiler/module/various/DialogCustom.java index aa38f57921..0dd6cbdd90 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/various/DialogCustom.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/various/DialogCustom.java @@ -6,7 +6,6 @@ import android.view.Gravity; import android.view.View; import android.view.Window; -import android.view.WindowInsets; import android.view.WindowManager; import android.widget.FrameLayout; @@ -20,8 +19,6 @@ import java.util.LinkedList; import java.util.List; -import de.robv.android.xposed.XC_MethodHook; -import de.robv.android.xposed.XposedBridge; import de.robv.android.xposed.XposedHelpers; public class DialogCustom extends BaseHook { @@ -54,7 +51,7 @@ public void init() { protected void after(MethodHookParam param) throws Throwable { Window mWindow = (Window) XposedHelpers.getObjectField(param.thisObject, "mWindow"); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) { - mWindow.getAttributes().setBlurBehindRadius(mPrefsMap.getInt("various_dialog_window_blur_radius", 60)); //android.R.styleable.Window_windowBlurBehindRadius + mWindow.getAttributes().setBlurBehindRadius(mPrefsMap.getInt("various_dialog_window_blur_radius", 60)); // android.R.styleable.Window_windowBlurBehindRadius } mWindow.addFlags(WindowManager.LayoutParams.FLAG_BLUR_BEHIND); } diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/various/DialogGravity.java b/app/src/main/java/com/sevtinge/cemiuiler/module/various/DialogGravity.java index d123c7e370..38c8f1672b 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/various/DialogGravity.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/various/DialogGravity.java @@ -48,7 +48,7 @@ public void init() { if (oldMethodFound) { - findAndHookMethod(mDialogCls,"setupDialogPanel", Configuration.class, new MethodHook() { + findAndHookMethod(mDialogCls, "setupDialogPanel", Configuration.class, new MethodHook() { @Override protected void after(MethodHookParam param) throws Throwable { mParentPanel = (View) XposedHelpers.getObjectField(param.thisObject, "mParentPanel"); @@ -61,11 +61,11 @@ protected void after(MethodHookParam param) throws Throwable { layoutParams.width = FrameLayout.LayoutParams.MATCH_PARENT; - layoutParams.gravity = mDialogGravity == 1 ? Gravity.CENTER : Gravity.BOTTOM|Gravity.CENTER; + layoutParams.gravity = mDialogGravity == 1 ? Gravity.CENTER : Gravity.BOTTOM | Gravity.CENTER; - layoutParams.setMarginStart(mDialogHorizontalMargin == 0 ? 0 : DisplayUtils.dip2px(mContext,mDialogHorizontalMargin)); - layoutParams.setMarginEnd(mDialogHorizontalMargin == 0 ? 0 : DisplayUtils.dip2px(mContext,mDialogHorizontalMargin)); - layoutParams.bottomMargin = mDialogGravity == 1 ? 0 : DisplayUtils.dip2px(mContext,mDialogBottomMargin); + layoutParams.setMarginStart(mDialogHorizontalMargin == 0 ? 0 : DisplayUtils.dip2px(mContext, mDialogHorizontalMargin)); + layoutParams.setMarginEnd(mDialogHorizontalMargin == 0 ? 0 : DisplayUtils.dip2px(mContext, mDialogHorizontalMargin)); + layoutParams.bottomMargin = mDialogGravity == 1 ? 0 : DisplayUtils.dip2px(mContext, mDialogBottomMargin); } mParentPanel.setLayoutParams(layoutParams); @@ -79,12 +79,12 @@ protected void after(MethodHookParam param) throws Throwable { } for (Method method : methodList) { - if (Arrays.equals(method.getParameterTypes(), new Class[]{Configuration.class}) && method.getReturnType() == Void.TYPE && method.getModifiers() == 2 && method.getParameterCount() == 1) { + if (Arrays.equals(method.getParameterTypes(), new Class[]{Configuration.class}) && method.getReturnType() == Void.TYPE && method.getModifiers() == 2 && method.getParameterCount() == 1) { LogUtils.log("2222" + method.getName()); - XposedHelpers.findAndHookMethod(mDialogCls,method.getName(),new MethodHook() { + XposedHelpers.findAndHookMethod(mDialogCls, method.getName(), new MethodHook() { @Override protected void after(MethodHookParam param) throws Throwable { - Field field = XposedHelpers.findFirstFieldByExactType(mDialogCls,mDialogParentPanelCls); + Field field = XposedHelpers.findFirstFieldByExactType(mDialogCls, mDialogParentPanelCls); mParentPanel = (View) field.get(param.thisObject); mContext = mParentPanel.getContext(); @@ -94,11 +94,11 @@ protected void after(MethodHookParam param) throws Throwable { if (mDialogGravity != 0) { layoutParams.width = FrameLayout.LayoutParams.MATCH_PARENT; - layoutParams.gravity = mDialogGravity == 1 ? Gravity.CENTER : Gravity.BOTTOM|Gravity.CENTER; + layoutParams.gravity = mDialogGravity == 1 ? Gravity.CENTER : Gravity.BOTTOM | Gravity.CENTER; - layoutParams.setMarginStart(mDialogHorizontalMargin == 0 ? 0 : DisplayUtils.dip2px(mContext,mDialogHorizontalMargin)); - layoutParams.setMarginEnd(mDialogHorizontalMargin == 0 ? 0 : DisplayUtils.dip2px(mContext,mDialogHorizontalMargin)); - layoutParams.bottomMargin = mDialogGravity == 1 ? 0 : DisplayUtils.dip2px(mContext,mDialogBottomMargin); + layoutParams.setMarginStart(mDialogHorizontalMargin == 0 ? 0 : DisplayUtils.dip2px(mContext, mDialogHorizontalMargin)); + layoutParams.setMarginEnd(mDialogHorizontalMargin == 0 ? 0 : DisplayUtils.dip2px(mContext, mDialogHorizontalMargin)); + layoutParams.bottomMargin = mDialogGravity == 1 ? 0 : DisplayUtils.dip2px(mContext, mDialogBottomMargin); } mParentPanel.setLayoutParams(layoutParams); diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/various/MiuiAppNoOverScroll.java b/app/src/main/java/com/sevtinge/cemiuiler/module/various/MiuiAppNoOverScroll.java index 001ff9104b..41f6c67601 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/various/MiuiAppNoOverScroll.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/various/MiuiAppNoOverScroll.java @@ -42,7 +42,7 @@ protected void after(MethodHookParam param) throws Throwable { hookAllConstructors(mRemixRvCls, new MethodHook() { @Override protected void after(MethodHookParam param) throws Throwable { - ((View)param.thisObject).setOverScrollMode(View.OVER_SCROLL_NEVER); + ((View) param.thisObject).setOverScrollMode(View.OVER_SCROLL_NEVER); XposedHelpers.setBooleanField(param.thisObject, "mSpringBackEnable", false); } }); diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/various/NotificationBlur.java b/app/src/main/java/com/sevtinge/cemiuiler/module/various/NotificationBlur.java index 10f7bd0fe2..9bfa962867 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/various/NotificationBlur.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/various/NotificationBlur.java @@ -17,16 +17,16 @@ public class NotificationBlur extends BaseHook { Class mCls = XposedHelpers.findClassIfExists("com.android.systemui.statusbar.notification.row.NotificationBackgroundView", lpparam.classLoader); Class mCls2 = XposedHelpers.findClassIfExists("com.android.systemui.statusbar.notification.policy.AppMiniWindowRowTouchHelper", lpparam.classLoader); Class mCls3 = XposedHelpers.findClassIfExists("com.android.systemui.statusbar.phone.MiuiNotificationPanelViewController", lpparam.classLoader); - Class mCls4 = XposedHelpers.findClassIfExists("com.android.keyguard.magazine.LockScreenMagazineController",lpparam.classLoader); - Class mCls5 = XposedHelpers.findClassIfExists("com.android.systemui.statusbar.phone.MiuiNotificationPanelViewController$mBlurRatioChangedListener$1",lpparam.classLoader); - Class mCls6 = XposedHelpers.findClassIfExists("com.android.systemui.shared.plugins.PluginInstanceManager$PluginHandler",lpparam.classLoader); - Class mCls7 = XposedHelpers.findClassIfExists("com.android.systemui.statusbar.notification.row.MiuiExpandableNotificationRow",lpparam.classLoader); - Class mCls8 = XposedHelpers.findClassIfExists("com.android.systemui.statusbar.notification.stack.NotificationStackScrollLayout",lpparam.classLoader); + Class mCls4 = XposedHelpers.findClassIfExists("com.android.keyguard.magazine.LockScreenMagazineController", lpparam.classLoader); + Class mCls5 = XposedHelpers.findClassIfExists("com.android.systemui.statusbar.phone.MiuiNotificationPanelViewController$mBlurRatioChangedListener$1", lpparam.classLoader); + Class mCls6 = XposedHelpers.findClassIfExists("com.android.systemui.shared.plugins.PluginInstanceManager$PluginHandler", lpparam.classLoader); + Class mCls7 = XposedHelpers.findClassIfExists("com.android.systemui.statusbar.notification.row.MiuiExpandableNotificationRow", lpparam.classLoader); + Class mCls8 = XposedHelpers.findClassIfExists("com.android.systemui.statusbar.notification.stack.NotificationStackScrollLayout", lpparam.classLoader); @Override public void init() { - hookAllMethods(mCls,"setCustomBackground", new MethodHook() { + hookAllMethods(mCls, "setCustomBackground", new MethodHook() { @Override protected void after(MethodHookParam param) throws Throwable { super.after(param); @@ -37,7 +37,7 @@ protected void after(MethodHookParam param) throws Throwable { } }); - hookAllMethods(mCls,"draw",new MethodHook() { + hookAllMethods(mCls, "draw", new MethodHook() { @Override protected void after(MethodHookParam param) throws Throwable { super.after(param); @@ -49,7 +49,7 @@ protected void after(MethodHookParam param) throws Throwable { } }); - hookAllMethods(mCls2,"onMiniWindowTrackingStart", new MethodHook() { + hookAllMethods(mCls2, "onMiniWindowTrackingStart", new MethodHook() { @Override protected void before(MethodHookParam param) throws Throwable { super.before(param); @@ -75,7 +75,7 @@ protected void before(MethodHookParam param) throws Throwable { } }); - hookAllMethods(mCls3,"onStateChanged", new MethodHook() { + hookAllMethods(mCls3, "onStateChanged", new MethodHook() { @Override protected void after(MethodHookParam param) throws Throwable { super.after(param); @@ -133,7 +133,7 @@ protected void after(MethodHookParam param) throws Throwable { }); - hookAllMethods(mCls4,"setViewsAlpha", new MethodHook() { + hookAllMethods(mCls4, "setViewsAlpha", new MethodHook() { @Override protected void before(MethodHookParam param) throws Throwable { super.before(param); diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/various/UnlockIme.kt b/app/src/main/java/com/sevtinge/cemiuiler/module/various/UnlockIme.kt index e05f302499..c659cf9dcd 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/various/UnlockIme.kt +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/various/UnlockIme.kt @@ -1,6 +1,5 @@ package com.sevtinge.cemiuiler.module.various -import com.sevtinge.cemiuiler.module.base.BaseHook import android.view.inputmethod.InputMethodManager import com.github.kyuubiran.ezxhelper.ClassUtils.loadClass import com.github.kyuubiran.ezxhelper.ClassUtils.loadClassOrNull @@ -8,6 +7,7 @@ import com.github.kyuubiran.ezxhelper.EzXHelper import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHook import com.github.kyuubiran.ezxhelper.Log import com.github.kyuubiran.ezxhelper.finders.MethodFinder.`-Static`.methodFinder +import com.sevtinge.cemiuiler.module.base.BaseHook import com.sevtinge.cemiuiler.utils.PropertyUtils import com.sevtinge.cemiuiler.utils.callStaticMethod import com.sevtinge.cemiuiler.utils.getObjectField @@ -33,7 +33,7 @@ object UnlockIme : BaseHook() { ) private fun startHook(lpparam: XC_LoadPackage.LoadPackageParam) { - //检查是否为小米定制输入法 + // 检查是否为小米定制输入法 val isNonCustomize = !miuiImeList.contains(lpparam.packageName) if (isNonCustomize) { val sInputMethodServiceInjector = @@ -44,7 +44,7 @@ object UnlockIme : BaseHook() { hookSIsImeSupport(it) hookIsXiaoAiEnable(it) - //将导航栏颜色赋值给输入法优化的底图 + // 将导航栏颜色赋值给输入法优化的底图 loadClass("com.android.internal.policy.PhoneWindow").methodFinder().first { name == "setNavigationBarColor" /* && parameterTypes.sameAs(Int::class.java) */ }.createHook { @@ -64,7 +64,7 @@ object UnlockIme : BaseHook() { lpparam.classLoader ) - //获取常用语的ClassLoader + // 获取常用语的ClassLoader loadClass("android.inputmethodservice.InputMethodModuleManager").methodFinder().first { name == "loadDex" /* && parameterTypes.sameAs(ClassLoader::class.java, String::class.java) */ }.createHook { @@ -82,7 +82,7 @@ object UnlockIme : BaseHook() { hookIsXiaoAiEnable(it) } - //针对A11的修复切换输入法列表 + // 针对A11的修复切换输入法列表 it.getMethod("getSupportIme").createHook { replace { _ -> it.getObjectField("sBottomViewHelper") @@ -135,10 +135,10 @@ object UnlockIme : BaseHook() { private fun hookDeleteNotSupportIme(className: String, classLoader: ClassLoader) { kotlin.runCatching { loadClass(className, classLoader).methodFinder().first { name == "deleteNotSupportIme" } - .createHook { returnConstant(null) } + .createHook { returnConstant(null) } }.onFailure { Log.i("Failed:Hook method deleteNotSupportIme") Log.i(it) } } -} \ No newline at end of file +} diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/voiceassist/UseThirdPartyBrowser.java b/app/src/main/java/com/sevtinge/cemiuiler/module/voiceassist/UseThirdPartyBrowser.java index bd5d6280a7..20c04da43d 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/voiceassist/UseThirdPartyBrowser.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/voiceassist/UseThirdPartyBrowser.java @@ -1,25 +1,19 @@ package com.sevtinge.cemiuiler.module.voiceassist; -import com.sevtinge.cemiuiler.module.base.BaseHook; +import static com.sevtinge.cemiuiler.module.voiceassist.VoiceAssistDexKit.mVoiceAssistResultMethodsMap; + import android.content.Intent; import android.net.Uri; -import de.robv.android.xposed.XC_MethodHook; -import de.robv.android.xposed.XC_MethodReplacement; -import de.robv.android.xposed.XposedBridge; -import de.robv.android.xposed.XposedHelpers; -import de.robv.android.xposed.callbacks.XC_LoadPackage; -import io.luckypray.dexkit.DexKitBridge; -import io.luckypray.dexkit.builder.BatchFindArgs; -import io.luckypray.dexkit.descriptor.member.DexMethodDescriptor; -import io.luckypray.dexkit.enums.MatchType; +import com.sevtinge.cemiuiler.module.base.BaseHook; import java.lang.reflect.Method; import java.util.List; -import java.util.Map; import java.util.Objects; -import static com.sevtinge.cemiuiler.module.voiceassist.VoiceAssistDexKit.mVoiceAssistResultMethodsMap; +import de.robv.android.xposed.XC_MethodHook; +import de.robv.android.xposed.XposedBridge; +import io.luckypray.dexkit.descriptor.member.DexMethodDescriptor; public class UseThirdPartyBrowser extends BaseHook { @@ -27,7 +21,7 @@ public void init() { Method browserActivityWithIntent = null; - //XposedBridge.log("Hook到小爱同学进程!"); + // XposedBridge.log("Hook到小爱同学进程!"); try { List result = Objects.requireNonNull(mVoiceAssistResultMethodsMap.get("BrowserActivityWithIntent")); for (DexMethodDescriptor descriptor : result) { @@ -37,12 +31,12 @@ public void init() { e.printStackTrace(); } log("com.miui.voiceassist browserActivityWithIntent method is " + browserActivityWithIntent); - //Class clazz = XposedHelpers.findClass("e.D.L.pa.Wa", lpparam.classLoader); + // Class clazz = XposedHelpers.findClass("e.D.L.pa.Wa", lpparam.classLoader); XposedBridge.hookMethod(browserActivityWithIntent, new XC_MethodHook() { @Override protected void beforeHookedMethod(MethodHookParam param) throws Throwable { super.beforeHookedMethod(param); - //XposedBridge.log("0)Hook到Activity启动,开始判断"); + // XposedBridge.log("0)Hook到Activity启动,开始判断"); Intent intent = (Intent) param.args[0]; log(intent.toString()); try { diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/voiceassist/VoiceAssistDexKit.java b/app/src/main/java/com/sevtinge/cemiuiler/module/voiceassist/VoiceAssistDexKit.java index c682f2bc06..75529a96b2 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/voiceassist/VoiceAssistDexKit.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/voiceassist/VoiceAssistDexKit.java @@ -1,14 +1,15 @@ package com.sevtinge.cemiuiler.module.voiceassist; import com.sevtinge.cemiuiler.module.base.BaseHook; + +import java.util.List; +import java.util.Map; + import io.luckypray.dexkit.DexKitBridge; import io.luckypray.dexkit.builder.BatchFindArgs; import io.luckypray.dexkit.descriptor.member.DexMethodDescriptor; import io.luckypray.dexkit.enums.MatchType; -import java.util.List; -import java.util.Map; - public class VoiceAssistDexKit extends BaseHook { public static Map> mVoiceAssistResultMethodsMap; @@ -23,15 +24,15 @@ public void init() { return; } mVoiceAssistResultMethodsMap = - bridge.batchFindMethodsUsingStrings( - BatchFindArgs.builder() - .addQuery("BrowserActivityWithIntent", List.of("IntentUtils", "permission click No Application can handle your intent")) - .matchType(MatchType.CONTAINS) - .build() - ); + bridge.batchFindMethodsUsingStrings( + BatchFindArgs.builder() + .addQuery("BrowserActivityWithIntent", List.of("IntentUtils", "permission click No Application can handle your intent")) + .matchType(MatchType.CONTAINS) + .build() + ); } catch (Throwable e) { e.printStackTrace(); } bridge.close(); } -} \ No newline at end of file +} diff --git a/app/src/main/java/com/sevtinge/cemiuiler/module/weather/SetDeviceLevel.java b/app/src/main/java/com/sevtinge/cemiuiler/module/weather/SetDeviceLevel.java index e4c2786cd2..fa4d2e4940 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/module/weather/SetDeviceLevel.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/module/weather/SetDeviceLevel.java @@ -2,14 +2,12 @@ import android.content.Context; import android.os.Bundle; + import com.sevtinge.cemiuiler.module.base.BaseHook; import com.sevtinge.cemiuiler.utils.LogUtils; import com.sevtinge.cemiuiler.utils.PrefsUtils; -import de.robv.android.xposed.XC_MethodHook; + import de.robv.android.xposed.XC_MethodReplacement; -import de.robv.android.xposed.XposedBridge; -import de.robv.android.xposed.XposedHelpers; -import de.robv.android.xposed.XC_MethodHook.MethodHookParam; public class SetDeviceLevel extends BaseHook { Class mUtil; @@ -17,9 +15,9 @@ public class SetDeviceLevel extends BaseHook { @Override public void init() { - log("Start to hook package " + lpparam.packageName); - mUtil = findClassIfExists("miuix.animation.utils.DeviceUtils"); - returnIntConstant(mUtil, "transDeviceLevel"); + log("Start to hook package " + lpparam.packageName); + mUtil = findClassIfExists("miuix.animation.utils.DeviceUtils"); + returnIntConstant(mUtil, "transDeviceLevel"); } diff --git a/app/src/main/java/com/sevtinge/cemiuiler/prefs/SeekBarPreferenceEx.java b/app/src/main/java/com/sevtinge/cemiuiler/prefs/SeekBarPreferenceEx.java index ae87e7c766..34254180f3 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/prefs/SeekBarPreferenceEx.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/prefs/SeekBarPreferenceEx.java @@ -7,12 +7,14 @@ import android.view.View; import android.widget.SeekBar; import android.widget.TextView; + import com.sevtinge.cemiuiler.R; -import moralnorm.preference.Preference; -import moralnorm.preference.PreferenceViewHolder; import java.util.IllegalFormatException; +import moralnorm.preference.Preference; +import moralnorm.preference.PreferenceViewHolder; + public class SeekBarPreferenceEx extends Preference { private int mDefaultValue; @@ -79,8 +81,8 @@ else if (mDefaultValue > mMaxValue) mDefaultValue = 0; } - mSteppedMinValue = Math.round((float)mMinValue / mStepValue); - mSteppedMaxValue = Math.round((float)mMaxValue / mStepValue); + mSteppedMinValue = Math.round((float) mMinValue / mStepValue); + mSteppedMaxValue = Math.round((float) mMaxValue / mStepValue); } @Override @@ -183,8 +185,8 @@ public void setDefaultValue(int value) { private void updateAllValues() { int currentValue = getValue(); if (mMaxValue <= mMinValue) mMaxValue = mMinValue + 1; - mSteppedMinValue = Math.round((float)mMinValue / mStepValue); - mSteppedMaxValue = Math.round((float)mMaxValue / mStepValue); + mSteppedMinValue = Math.round((float) mMinValue / mStepValue); + mSteppedMaxValue = Math.round((float) mMaxValue / mStepValue); if (mSeekBar != null) mSeekBar.setMax(mSteppedMaxValue - mSteppedMinValue); @@ -197,7 +199,7 @@ private void updateAllValues() { } private int getBoundedValue(int value) { - value = Math.round((float)value / mStepValue); + value = Math.round((float) value / mStepValue); if (value < mSteppedMinValue) value = mSteppedMinValue; if (value > mSteppedMaxValue) value = mSteppedMaxValue; return value; @@ -221,7 +223,7 @@ private void updateDisplay(int value) { try { if (mUseDisplayDividerValue) { - float floatValue = (float)value / (float)mDisplayDividerValue; + float floatValue = (float) value / (float) mDisplayDividerValue; text = String.format(mFormat, floatValue); } else { text = String.format(mFormat, value); diff --git a/app/src/main/java/com/sevtinge/cemiuiler/provider/SharedPrefsProvider.java b/app/src/main/java/com/sevtinge/cemiuiler/provider/SharedPrefsProvider.java index f3691af662..a078124c16 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/provider/SharedPrefsProvider.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/provider/SharedPrefsProvider.java @@ -50,7 +50,7 @@ public boolean onCreate() { @Override public Cursor query(Uri uri, String[] projection, String selection, String[] selectionArgs, String sortOrder) { List parts = uri.getPathSegments(); - //Log.e("parts", String.valueOf(parts)); + // Log.e("parts", String.valueOf(parts)); MatrixCursor cursor = new MatrixCursor(new String[]{"data"}); switch (uriMatcher.match(uri)) { @@ -129,4 +129,4 @@ public int update(Uri uri, ContentValues values, String selection, String[] sele return 0; } -} \ No newline at end of file +} diff --git a/app/src/main/java/com/sevtinge/cemiuiler/titles/HighBrightnessMode.kt b/app/src/main/java/com/sevtinge/cemiuiler/titles/HighBrightnessMode.kt index a1bf7c19db..850dba170d 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/titles/HighBrightnessMode.kt +++ b/app/src/main/java/com/sevtinge/cemiuiler/titles/HighBrightnessMode.kt @@ -51,7 +51,7 @@ class HighBrightnessMode : TileService() { maxFile = "/sys/class/mi_display/disp-DSI-0/max_brightness_clone" file = "/sys/class/mi_display/disp-DSI-0/brightness_clone" } else { - maxFile = "/sys/class/backlight/panel0-backlight/max_brightness" + maxFile = "/sys/class/backlight/panel0-backlight/max_brightness" file = "/sys/class/backlight/panel0-backlight/brightness" } diff --git a/app/src/main/java/com/sevtinge/cemiuiler/ui/AboutActivity.kt b/app/src/main/java/com/sevtinge/cemiuiler/ui/AboutActivity.kt index d9736f42d9..ac9594a01c 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/ui/AboutActivity.kt +++ b/app/src/main/java/com/sevtinge/cemiuiler/ui/AboutActivity.kt @@ -4,13 +4,13 @@ import android.content.Intent import android.net.Uri import android.os.Bundle import androidx.fragment.app.Fragment +import com.sevtinge.cemiuiler.BuildConfig import com.sevtinge.cemiuiler.R import com.sevtinge.cemiuiler.ui.base.SubFragment import moralnorm.appcompat.app.AppCompatActivity import moralnorm.internal.utils.ViewUtils import moralnorm.preference.Preference import moralnorm.preference.SwitchPreference -import com.sevtinge.cemiuiler.BuildConfig import java.util.Calendar @@ -38,7 +38,7 @@ class AboutActivity : AppCompatActivity() { override fun initPrefs() { val c = Calendar.getInstance() - val hours: Int = when(val hour = c.get(Calendar.HOUR_OF_DAY)) { + val hours: Int = when (val hour = c.get(Calendar.HOUR_OF_DAY)) { 0 -> 24 else -> hour } @@ -56,20 +56,20 @@ class AboutActivity : AppCompatActivity() { versionClickTime++ if (it.isChecked) { if (versionClickTime < maxCloseClickTime) { - //ToastHelper.makeText(context, "都启动过了还点?") + // ToastHelper.makeText(context, "都启动过了还点?") } else { it.isChecked = !(it.isChecked) versionClickTime = 0 - //ToastHelper.makeText(context, "行吧给你关咯") + // ToastHelper.makeText(context, "行吧给你关咯") } } else if (versionClickTime < hours) { - //val string = String.format("还需点击%d次", hour - versionClickTime) - //ToastHelper.makeText(context, string) + // val string = String.format("还需点击%d次", hour - versionClickTime) + // ToastHelper.makeText(context, string) } else { it.isChecked = !(it.isChecked) versionClickTime = 0 // val string = String.format("已启动") - //ToastHelper.makeText(context, string) + // ToastHelper.makeText(context, string) } false } @@ -89,7 +89,7 @@ class AboutActivity : AppCompatActivity() { private fun String.joinQQGroup(): Boolean { val intent = Intent() intent.data = - Uri.parse("mqqopensdkapi://bizAgent/qm/qr?url=http%3A%2F%2Fqm.qq.com%2Fcgi-bin%2Fqm%2Fqr%3Ffrom%3Dapp%26p%3Dandroid%26jump_from%3Dwebapi%26k%3D${this}") //https://jq.qq.com/?_wv=1027&k=EsyE1RhL + Uri.parse("mqqopensdkapi://bizAgent/qm/qr?url=http%3A%2F%2Fqm.qq.com%2Fcgi-bin%2Fqm%2Fqr%3Ffrom%3Dapp%26p%3Dandroid%26jump_from%3Dwebapi%26k%3D${this}") // https://jq.qq.com/?_wv=1027&k=EsyE1RhL // 此Flag可根据具体产品需要自定义,如设置,则在加群界面按返回,返回手Q主界面,不设置,按返回会返回到呼起产品界面 //intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK) return try { startActivity(intent) @@ -101,4 +101,4 @@ class AboutActivity : AppCompatActivity() { } } -} \ No newline at end of file +} diff --git a/app/src/main/java/com/sevtinge/cemiuiler/ui/AboutContributerActivity.java b/app/src/main/java/com/sevtinge/cemiuiler/ui/AboutContributerActivity.java index 719afde347..6b30c2eb64 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/ui/AboutContributerActivity.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/ui/AboutContributerActivity.java @@ -1,24 +1,25 @@ package com.sevtinge.cemiuiler.ui; import androidx.fragment.app.Fragment; + import com.sevtinge.cemiuiler.R; import com.sevtinge.cemiuiler.ui.base.BaseAppCompatActivity; import com.sevtinge.cemiuiler.ui.base.SubFragment; public class AboutContributerActivity extends BaseAppCompatActivity { - @Override - public Fragment initFragment() { - return new com.sevtinge.cemiuiler.ui.AboutContributerActivity.AboutContributerFragment(); - } + @Override + public Fragment initFragment() { + return new com.sevtinge.cemiuiler.ui.AboutContributerActivity.AboutContributerFragment(); + } - public static class AboutContributerFragment extends SubFragment { + public static class AboutContributerFragment extends SubFragment { - @Override - public int getContentResId() { - return R.xml.prefs_about_contributer; - } + @Override + public int getContentResId() { + return R.xml.prefs_about_contributer; } + } - } +} diff --git a/app/src/main/java/com/sevtinge/cemiuiler/ui/AboutUseActivity.java b/app/src/main/java/com/sevtinge/cemiuiler/ui/AboutUseActivity.java index 85e93eb85f..5efa8a03e0 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/ui/AboutUseActivity.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/ui/AboutUseActivity.java @@ -1,6 +1,7 @@ package com.sevtinge.cemiuiler.ui; import androidx.fragment.app.Fragment; + import com.sevtinge.cemiuiler.R; import com.sevtinge.cemiuiler.ui.base.BaseAppCompatActivity; import com.sevtinge.cemiuiler.ui.base.SubFragment; diff --git a/app/src/main/java/com/sevtinge/cemiuiler/ui/AiAsstActivity.java b/app/src/main/java/com/sevtinge/cemiuiler/ui/AiAsstActivity.java index d0461e8356..2bb745d0e9 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/ui/AiAsstActivity.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/ui/AiAsstActivity.java @@ -1,6 +1,7 @@ package com.sevtinge.cemiuiler.ui; import androidx.fragment.app.Fragment; + import com.sevtinge.cemiuiler.R; import com.sevtinge.cemiuiler.ui.base.BaseAppCompatActivity; import com.sevtinge.cemiuiler.ui.base.SubFragment; diff --git a/app/src/main/java/com/sevtinge/cemiuiler/ui/AirecoActivity.java b/app/src/main/java/com/sevtinge/cemiuiler/ui/AirecoActivity.java index 7186d719fc..597045160b 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/ui/AirecoActivity.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/ui/AirecoActivity.java @@ -1,27 +1,28 @@ package com.sevtinge.cemiuiler.ui; import androidx.fragment.app.Fragment; + import com.sevtinge.cemiuiler.R; import com.sevtinge.cemiuiler.ui.base.BaseAppCompatActivity; import com.sevtinge.cemiuiler.ui.base.SubFragment; public class AirecoActivity extends BaseAppCompatActivity { - @Override - public Fragment initFragment() { - return new com.sevtinge.cemiuiler.ui.AirecoActivity.AirecoFragment(); - } + @Override + public Fragment initFragment() { + return new com.sevtinge.cemiuiler.ui.AirecoActivity.AirecoFragment(); + } - public static class AirecoFragment extends SubFragment { + public static class AirecoFragment extends SubFragment { - @Override - public int getContentResId() { - return R.xml.aireco; - } + @Override + public int getContentResId() { + return R.xml.aireco; } + } - } +} diff --git a/app/src/main/java/com/sevtinge/cemiuiler/ui/CameraActivity.java b/app/src/main/java/com/sevtinge/cemiuiler/ui/CameraActivity.java index ef877a2b43..e5deda6297 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/ui/CameraActivity.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/ui/CameraActivity.java @@ -1,6 +1,7 @@ package com.sevtinge.cemiuiler.ui; import androidx.fragment.app.Fragment; + import com.sevtinge.cemiuiler.R; import com.sevtinge.cemiuiler.ui.base.BaseAppCompatActivity; import com.sevtinge.cemiuiler.ui.base.SubFragment; diff --git a/app/src/main/java/com/sevtinge/cemiuiler/ui/ClockActivity.java b/app/src/main/java/com/sevtinge/cemiuiler/ui/ClockActivity.java index c7372b881e..54a6568b61 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/ui/ClockActivity.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/ui/ClockActivity.java @@ -1,6 +1,7 @@ package com.sevtinge.cemiuiler.ui; import androidx.fragment.app.Fragment; + import com.sevtinge.cemiuiler.R; import com.sevtinge.cemiuiler.ui.base.BaseAppCompatActivity; import com.sevtinge.cemiuiler.ui.base.SubFragment; diff --git a/app/src/main/java/com/sevtinge/cemiuiler/ui/ContentExtensionActivity.java b/app/src/main/java/com/sevtinge/cemiuiler/ui/ContentExtensionActivity.java index 38a160d0e4..c52ae14db3 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/ui/ContentExtensionActivity.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/ui/ContentExtensionActivity.java @@ -1,24 +1,25 @@ package com.sevtinge.cemiuiler.ui; import androidx.fragment.app.Fragment; + import com.sevtinge.cemiuiler.R; import com.sevtinge.cemiuiler.ui.base.BaseAppCompatActivity; import com.sevtinge.cemiuiler.ui.base.SubFragment; public class ContentExtensionActivity extends BaseAppCompatActivity { - @Override - public Fragment initFragment() { - return new com.sevtinge.cemiuiler.ui.ContentExtensionActivity.ContentExtensionFragment(); - } + @Override + public Fragment initFragment() { + return new com.sevtinge.cemiuiler.ui.ContentExtensionActivity.ContentExtensionFragment(); + } - public static class ContentExtensionFragment extends SubFragment { + public static class ContentExtensionFragment extends SubFragment { - @Override - public int getContentResId() { - return R.xml.content_extension; - } + @Override + public int getContentResId() { + return R.xml.content_extension; } + } - } +} diff --git a/app/src/main/java/com/sevtinge/cemiuiler/ui/DownloadsActivity.java b/app/src/main/java/com/sevtinge/cemiuiler/ui/DownloadsActivity.java index 7b88514fd1..a552e9a13a 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/ui/DownloadsActivity.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/ui/DownloadsActivity.java @@ -1,6 +1,7 @@ package com.sevtinge.cemiuiler.ui; import androidx.fragment.app.Fragment; + import com.sevtinge.cemiuiler.R; import com.sevtinge.cemiuiler.ui.base.BaseAppCompatActivity; import com.sevtinge.cemiuiler.ui.base.SubFragment; diff --git a/app/src/main/java/com/sevtinge/cemiuiler/ui/GalleryActivity.java b/app/src/main/java/com/sevtinge/cemiuiler/ui/GalleryActivity.java index 8fa8e7bbd3..b906840cbd 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/ui/GalleryActivity.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/ui/GalleryActivity.java @@ -1,6 +1,7 @@ package com.sevtinge.cemiuiler.ui; import androidx.fragment.app.Fragment; + import com.sevtinge.cemiuiler.R; import com.sevtinge.cemiuiler.ui.base.BaseAppCompatActivity; import com.sevtinge.cemiuiler.ui.base.SubFragment; diff --git a/app/src/main/java/com/sevtinge/cemiuiler/ui/GuardProviderActivity.java b/app/src/main/java/com/sevtinge/cemiuiler/ui/GuardProviderActivity.java index e1a013dd75..878a4ae418 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/ui/GuardProviderActivity.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/ui/GuardProviderActivity.java @@ -1,6 +1,7 @@ package com.sevtinge.cemiuiler.ui; import androidx.fragment.app.Fragment; + import com.sevtinge.cemiuiler.R; import com.sevtinge.cemiuiler.ui.base.BaseAppCompatActivity; import com.sevtinge.cemiuiler.ui.base.SubFragment; diff --git a/app/src/main/java/com/sevtinge/cemiuiler/ui/HideAppActivity.java b/app/src/main/java/com/sevtinge/cemiuiler/ui/HideAppActivity.java index 34c9c53786..cdc2d4a603 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/ui/HideAppActivity.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/ui/HideAppActivity.java @@ -2,4 +2,5 @@ import moralnorm.appcompat.app.AppCompatActivity; -public class HideAppActivity extends AppCompatActivity {} +public class HideAppActivity extends AppCompatActivity { +} diff --git a/app/src/main/java/com/sevtinge/cemiuiler/ui/InCallUiActivity.java b/app/src/main/java/com/sevtinge/cemiuiler/ui/InCallUiActivity.java index 541e3414dd..7889857f99 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/ui/InCallUiActivity.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/ui/InCallUiActivity.java @@ -1,26 +1,27 @@ package com.sevtinge.cemiuiler.ui; import androidx.fragment.app.Fragment; + import com.sevtinge.cemiuiler.R; import com.sevtinge.cemiuiler.ui.base.BaseAppCompatActivity; import com.sevtinge.cemiuiler.ui.base.SubFragment; public class InCallUiActivity extends BaseAppCompatActivity { - @Override - public Fragment initFragment() { - return new com.sevtinge.cemiuiler.ui.InCallUiActivity.InCallUiFragment(); - } + @Override + public Fragment initFragment() { + return new com.sevtinge.cemiuiler.ui.InCallUiActivity.InCallUiFragment(); + } - public static class InCallUiFragment extends SubFragment { + public static class InCallUiFragment extends SubFragment { - @Override - public int getContentResId() { - return R.xml.incallui; - } + @Override + public int getContentResId() { + return R.xml.incallui; } + } - } +} diff --git a/app/src/main/java/com/sevtinge/cemiuiler/ui/JoyoseActivity.java b/app/src/main/java/com/sevtinge/cemiuiler/ui/JoyoseActivity.java index 32b6ec3250..80025ab37b 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/ui/JoyoseActivity.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/ui/JoyoseActivity.java @@ -1,6 +1,7 @@ package com.sevtinge.cemiuiler.ui; import androidx.fragment.app.Fragment; + import com.sevtinge.cemiuiler.R; import com.sevtinge.cemiuiler.ui.base.BaseAppCompatActivity; import com.sevtinge.cemiuiler.ui.base.SubFragment; diff --git a/app/src/main/java/com/sevtinge/cemiuiler/ui/LbeActivity.java b/app/src/main/java/com/sevtinge/cemiuiler/ui/LbeActivity.java index dd9025b010..bb91c4f4c3 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/ui/LbeActivity.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/ui/LbeActivity.java @@ -1,6 +1,7 @@ package com.sevtinge.cemiuiler.ui; import androidx.fragment.app.Fragment; + import com.sevtinge.cemiuiler.R; import com.sevtinge.cemiuiler.ui.base.BaseAppCompatActivity; import com.sevtinge.cemiuiler.ui.base.SubFragment; diff --git a/app/src/main/java/com/sevtinge/cemiuiler/ui/MainActivity.java b/app/src/main/java/com/sevtinge/cemiuiler/ui/MainActivity.java index 3df78ad9b3..bb9f0b8a1e 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/ui/MainActivity.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/ui/MainActivity.java @@ -12,21 +12,16 @@ import com.sevtinge.cemiuiler.R; import com.sevtinge.cemiuiler.module.GlobalActions; -import com.sevtinge.cemiuiler.module.base.BaseHook; -import com.sevtinge.cemiuiler.ui.main.fragment.MainFragment; import com.sevtinge.cemiuiler.ui.main.base.BaseMainActivity; +import com.sevtinge.cemiuiler.ui.main.fragment.MainFragment; import com.sevtinge.cemiuiler.utils.ALPermissionManager; import com.sevtinge.cemiuiler.view.CustomMultipleChoiceView; - import java.util.Arrays; import java.util.List; -import de.robv.android.xposed.XposedBridge; import moralnorm.appcompat.app.AlertDialog; -import static com.sevtinge.cemiuiler.module.base.BaseHook.mPrefsMap; - public class MainActivity extends BaseMainActivity { private final MainFragment mMainFrag = new MainFragment(); @@ -44,7 +39,7 @@ protected void onCreate(Bundle savedInstanceState) { ALPermissionManager.RootCommand(getPackageCodePath()); - //XposedBridge.log("Cemiuiler: Detail log is " + mPrefsMap.getBoolean("settings_disable_detailed_log") + "."); + // XposedBridge.log("Cemiuiler: Detail log is " + mPrefsMap.getBoolean("settings_disable_detailed_log") + "."); } diff --git a/app/src/main/java/com/sevtinge/cemiuiler/ui/MarketActivity.java b/app/src/main/java/com/sevtinge/cemiuiler/ui/MarketActivity.java index 1ae89d00cd..281e3974c7 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/ui/MarketActivity.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/ui/MarketActivity.java @@ -1,24 +1,25 @@ package com.sevtinge.cemiuiler.ui; import androidx.fragment.app.Fragment; + import com.sevtinge.cemiuiler.R; import com.sevtinge.cemiuiler.ui.base.BaseAppCompatActivity; import com.sevtinge.cemiuiler.ui.base.SubFragment; public class MarketActivity extends BaseAppCompatActivity { - @Override - public Fragment initFragment() { - return new com.sevtinge.cemiuiler.ui.MarketActivity.MarketFragment(); - } + @Override + public Fragment initFragment() { + return new com.sevtinge.cemiuiler.ui.MarketActivity.MarketFragment(); + } - public static class MarketFragment extends SubFragment { + public static class MarketFragment extends SubFragment { - @Override - public int getContentResId() { - return R.xml.market; - } + @Override + public int getContentResId() { + return R.xml.market; } + } - } +} diff --git a/app/src/main/java/com/sevtinge/cemiuiler/ui/MediaEditorActivity.java b/app/src/main/java/com/sevtinge/cemiuiler/ui/MediaEditorActivity.java index 5e81be6af9..46403957b0 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/ui/MediaEditorActivity.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/ui/MediaEditorActivity.java @@ -1,27 +1,28 @@ package com.sevtinge.cemiuiler.ui; import androidx.fragment.app.Fragment; + import com.sevtinge.cemiuiler.R; import com.sevtinge.cemiuiler.ui.base.BaseAppCompatActivity; import com.sevtinge.cemiuiler.ui.base.SubFragment; -public class MediaEditorActivity extends BaseAppCompatActivity { +public class MediaEditorActivity extends BaseAppCompatActivity { - @Override - public Fragment initFragment() { - return new com.sevtinge.cemiuiler.ui.MediaEditorActivity.MediaEditorFragment(); - } + @Override + public Fragment initFragment() { + return new com.sevtinge.cemiuiler.ui.MediaEditorActivity.MediaEditorFragment(); + } - public static class MediaEditorFragment extends SubFragment { + public static class MediaEditorFragment extends SubFragment { - @Override - public int getContentResId() { - return R.xml.mediaeditor; - } + @Override + public int getContentResId() { + return R.xml.mediaeditor; } + } - } +} diff --git a/app/src/main/java/com/sevtinge/cemiuiler/ui/MiLinkActivity.java b/app/src/main/java/com/sevtinge/cemiuiler/ui/MiLinkActivity.java index ffb4d19b46..415e15412b 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/ui/MiLinkActivity.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/ui/MiLinkActivity.java @@ -1,6 +1,7 @@ package com.sevtinge.cemiuiler.ui; import androidx.fragment.app.Fragment; + import com.sevtinge.cemiuiler.R; import com.sevtinge.cemiuiler.ui.base.BaseAppCompatActivity; import com.sevtinge.cemiuiler.ui.base.SubFragment; diff --git a/app/src/main/java/com/sevtinge/cemiuiler/ui/MiShareActivity.java b/app/src/main/java/com/sevtinge/cemiuiler/ui/MiShareActivity.java index b9d33370d3..51b102c0b5 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/ui/MiShareActivity.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/ui/MiShareActivity.java @@ -5,6 +5,7 @@ import com.sevtinge.cemiuiler.R; import com.sevtinge.cemiuiler.ui.base.BaseAppCompatActivity; import com.sevtinge.cemiuiler.ui.base.SubFragment; + import moralnorm.preference.SwitchPreference; public class MiShareActivity extends BaseAppCompatActivity { diff --git a/app/src/main/java/com/sevtinge/cemiuiler/ui/MiWallpaperActivity.java b/app/src/main/java/com/sevtinge/cemiuiler/ui/MiWallpaperActivity.java index eacb5b73fc..6dd56382bb 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/ui/MiWallpaperActivity.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/ui/MiWallpaperActivity.java @@ -1,6 +1,7 @@ package com.sevtinge.cemiuiler.ui; import androidx.fragment.app.Fragment; + import com.sevtinge.cemiuiler.R; import com.sevtinge.cemiuiler.ui.base.SubFragment; import com.sevtinge.cemiuiler.ui.systemframework.base.BaseSystemFrameWorkActivity; diff --git a/app/src/main/java/com/sevtinge/cemiuiler/ui/MirrorActivity.java b/app/src/main/java/com/sevtinge/cemiuiler/ui/MirrorActivity.java index 305c512564..d943c99a8b 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/ui/MirrorActivity.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/ui/MirrorActivity.java @@ -1,6 +1,7 @@ package com.sevtinge.cemiuiler.ui; import androidx.fragment.app.Fragment; + import com.sevtinge.cemiuiler.R; import com.sevtinge.cemiuiler.ui.base.BaseAppCompatActivity; import com.sevtinge.cemiuiler.ui.base.SubFragment; diff --git a/app/src/main/java/com/sevtinge/cemiuiler/ui/MmsActivity.java b/app/src/main/java/com/sevtinge/cemiuiler/ui/MmsActivity.java index e683b654de..264ed678f7 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/ui/MmsActivity.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/ui/MmsActivity.java @@ -1,6 +1,7 @@ package com.sevtinge.cemiuiler.ui; import androidx.fragment.app.Fragment; + import com.sevtinge.cemiuiler.R; import com.sevtinge.cemiuiler.ui.base.BaseAppCompatActivity; import com.sevtinge.cemiuiler.ui.base.SubFragment; diff --git a/app/src/main/java/com/sevtinge/cemiuiler/ui/MtbActivity.java b/app/src/main/java/com/sevtinge/cemiuiler/ui/MtbActivity.java index 6bda6594b1..0014d1b38b 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/ui/MtbActivity.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/ui/MtbActivity.java @@ -1,6 +1,7 @@ package com.sevtinge.cemiuiler.ui; import androidx.fragment.app.Fragment; + import com.sevtinge.cemiuiler.R; import com.sevtinge.cemiuiler.ui.base.BaseAppCompatActivity; import com.sevtinge.cemiuiler.ui.base.SubFragment; @@ -20,4 +21,4 @@ public int getContentResId() { return R.xml.mtb; } } -} \ No newline at end of file +} diff --git a/app/src/main/java/com/sevtinge/cemiuiler/ui/MusicActivity.java b/app/src/main/java/com/sevtinge/cemiuiler/ui/MusicActivity.java index bc20ff00b3..cc26a0dd25 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/ui/MusicActivity.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/ui/MusicActivity.java @@ -1,26 +1,27 @@ package com.sevtinge.cemiuiler.ui; import androidx.fragment.app.Fragment; + import com.sevtinge.cemiuiler.R; import com.sevtinge.cemiuiler.ui.base.BaseAppCompatActivity; import com.sevtinge.cemiuiler.ui.base.SubFragment; public class MusicActivity extends BaseAppCompatActivity { - @Override - public Fragment initFragment() { - return new com.sevtinge.cemiuiler.ui.MusicActivity.MusicFragment(); - } + @Override + public Fragment initFragment() { + return new com.sevtinge.cemiuiler.ui.MusicActivity.MusicFragment(); + } - public static class MusicFragment extends SubFragment { + public static class MusicFragment extends SubFragment { - @Override - public int getContentResId() { - return R.xml.music; - } + @Override + public int getContentResId() { + return R.xml.music; } + } - } +} diff --git a/app/src/main/java/com/sevtinge/cemiuiler/ui/PersonalAssistantActivity.java b/app/src/main/java/com/sevtinge/cemiuiler/ui/PersonalAssistantActivity.java index 77d4ab0418..0123de67ff 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/ui/PersonalAssistantActivity.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/ui/PersonalAssistantActivity.java @@ -28,7 +28,7 @@ public int getContentResId() { public void initPrefs() { mWidgetCrack = findPreference("prefs_key_personal_assistant_widget_crack"); - if (!getSharedPreferences().getBoolean("prefs_key_hidden_function",false)) { + if (!getSharedPreferences().getBoolean("prefs_key_hidden_function", false)) { mWidgetCrack.setVisible(false); } } diff --git a/app/src/main/java/com/sevtinge/cemiuiler/ui/PhoneActivity.java b/app/src/main/java/com/sevtinge/cemiuiler/ui/PhoneActivity.java index 35ed932b5f..670a5acf85 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/ui/PhoneActivity.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/ui/PhoneActivity.java @@ -1,6 +1,7 @@ package com.sevtinge.cemiuiler.ui; import androidx.fragment.app.Fragment; + import com.sevtinge.cemiuiler.R; import com.sevtinge.cemiuiler.ui.base.BaseAppCompatActivity; import com.sevtinge.cemiuiler.ui.base.SubFragment; @@ -20,4 +21,4 @@ public int getContentResId() { return R.xml.phone; } } -} \ No newline at end of file +} diff --git a/app/src/main/java/com/sevtinge/cemiuiler/ui/PowerKeeperActivity.java b/app/src/main/java/com/sevtinge/cemiuiler/ui/PowerKeeperActivity.java index 55635e060a..d4a86a60ad 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/ui/PowerKeeperActivity.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/ui/PowerKeeperActivity.java @@ -1,26 +1,27 @@ package com.sevtinge.cemiuiler.ui; import androidx.fragment.app.Fragment; + import com.sevtinge.cemiuiler.R; import com.sevtinge.cemiuiler.ui.base.BaseAppCompatActivity; import com.sevtinge.cemiuiler.ui.base.SubFragment; -public class PowerKeeperActivity extends BaseAppCompatActivity { +public class PowerKeeperActivity extends BaseAppCompatActivity { - @Override - public Fragment initFragment() { - return new com.sevtinge.cemiuiler.ui.PowerKeeperActivity.PowerKeeperFragment(); - } + @Override + public Fragment initFragment() { + return new com.sevtinge.cemiuiler.ui.PowerKeeperActivity.PowerKeeperFragment(); + } - public static class PowerKeeperFragment extends SubFragment { + public static class PowerKeeperFragment extends SubFragment { - @Override - public int getContentResId() { - return R.xml.powerkeeper; - } + @Override + public int getContentResId() { + return R.xml.powerkeeper; } + } - } +} diff --git a/app/src/main/java/com/sevtinge/cemiuiler/ui/ScannerActivity.java b/app/src/main/java/com/sevtinge/cemiuiler/ui/ScannerActivity.java index 4a890f5902..ebb874c521 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/ui/ScannerActivity.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/ui/ScannerActivity.java @@ -1,6 +1,7 @@ package com.sevtinge.cemiuiler.ui; import androidx.fragment.app.Fragment; + import com.sevtinge.cemiuiler.R; import com.sevtinge.cemiuiler.ui.base.BaseAppCompatActivity; import com.sevtinge.cemiuiler.ui.base.SubFragment; diff --git a/app/src/main/java/com/sevtinge/cemiuiler/ui/ScreenRecorderActivity.java b/app/src/main/java/com/sevtinge/cemiuiler/ui/ScreenRecorderActivity.java index aad6c59e5b..064c364dbe 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/ui/ScreenRecorderActivity.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/ui/ScreenRecorderActivity.java @@ -1,6 +1,7 @@ package com.sevtinge.cemiuiler.ui; import androidx.fragment.app.Fragment; + import com.sevtinge.cemiuiler.R; import com.sevtinge.cemiuiler.ui.base.BaseAppCompatActivity; import com.sevtinge.cemiuiler.ui.base.SubFragment; diff --git a/app/src/main/java/com/sevtinge/cemiuiler/ui/ScreenShotActivity.java b/app/src/main/java/com/sevtinge/cemiuiler/ui/ScreenShotActivity.java index 096e33f18a..110dbf4044 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/ui/ScreenShotActivity.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/ui/ScreenShotActivity.java @@ -1,26 +1,27 @@ package com.sevtinge.cemiuiler.ui; import androidx.fragment.app.Fragment; + import com.sevtinge.cemiuiler.R; import com.sevtinge.cemiuiler.ui.base.BaseAppCompatActivity; import com.sevtinge.cemiuiler.ui.base.SubFragment; public class ScreenShotActivity extends BaseAppCompatActivity { - @Override - public Fragment initFragment() { - return new com.sevtinge.cemiuiler.ui.ScreenShotActivity.ScreenShotFragment(); - } + @Override + public Fragment initFragment() { + return new com.sevtinge.cemiuiler.ui.ScreenShotActivity.ScreenShotFragment(); + } - public static class ScreenShotFragment extends SubFragment { + public static class ScreenShotFragment extends SubFragment { - @Override - public int getContentResId() { - return R.xml.screenshot; - } + @Override + public int getContentResId() { + return R.xml.screenshot; } + } - } +} diff --git a/app/src/main/java/com/sevtinge/cemiuiler/ui/SecurityCenterActivity.java b/app/src/main/java/com/sevtinge/cemiuiler/ui/SecurityCenterActivity.java index fa294fc362..f096f77353 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/ui/SecurityCenterActivity.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/ui/SecurityCenterActivity.java @@ -70,12 +70,12 @@ public void initPrefs() { mAiClipboard.setChecked(mAiClipboardEnable); mBlurLocation.setOnPreferenceChangeListener((preference, o) -> { - Settings.Secure.putInt(getContext().getContentResolver(), "mi_lab_blur_location_enable", (Boolean)o ? 1 : 0); + Settings.Secure.putInt(getContext().getContentResolver(), "mi_lab_blur_location_enable", (Boolean) o ? 1 : 0); return true; }); mAiClipboard.setOnPreferenceChangeListener((preference, o) -> { - Settings.Secure.putInt(getContext().getContentResolver(), "mi_lab_ai_clipboard_enable", (Boolean)o ? 1 : 0); + Settings.Secure.putInt(getContext().getContentResolver(), "mi_lab_ai_clipboard_enable", (Boolean) o ? 1 : 0); return true; }); diff --git a/app/src/main/java/com/sevtinge/cemiuiler/ui/SettingsActivity.java b/app/src/main/java/com/sevtinge/cemiuiler/ui/SettingsActivity.java index cc1d0f94f3..eb9cc8749e 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/ui/SettingsActivity.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/ui/SettingsActivity.java @@ -126,7 +126,7 @@ public void initPrefs() { @Override public boolean onPreferenceChange(Preference preference, Object o) { if (preference == mIconModePreference) { - setIconMode(Integer.parseInt((String)o)); + setIconMode(Integer.parseInt((String) o)); } return true; } diff --git a/app/src/main/java/com/sevtinge/cemiuiler/ui/SystemFrameworkActivity.java b/app/src/main/java/com/sevtinge/cemiuiler/ui/SystemFrameworkActivity.java index cb39e92c43..54d04b4c83 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/ui/SystemFrameworkActivity.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/ui/SystemFrameworkActivity.java @@ -1,12 +1,9 @@ package com.sevtinge.cemiuiler.ui; -import android.os.Bundle; - import androidx.fragment.app.Fragment; import com.sevtinge.cemiuiler.R; import com.sevtinge.cemiuiler.ui.base.BaseAppCompatActivity; - import com.sevtinge.cemiuiler.ui.base.SubFragment; diff --git a/app/src/main/java/com/sevtinge/cemiuiler/ui/SystemSettingsActivity.java b/app/src/main/java/com/sevtinge/cemiuiler/ui/SystemSettingsActivity.java index 3be35ac397..b255f9f493 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/ui/SystemSettingsActivity.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/ui/SystemSettingsActivity.java @@ -19,9 +19,9 @@ public Fragment initFragment() { public static class SystemSettingsFragment extends SubFragment { - PreferenceCategory mHighMode; //极致模式 - SwitchPreference mAreaScreenshot; //区域截屏 - SwitchPreference mKnuckleFunction; //指关节相关 + PreferenceCategory mHighMode; // 极致模式 + SwitchPreference mAreaScreenshot; // 区域截屏 + SwitchPreference mKnuckleFunction; // 指关节相关 @Override public int getContentResId() { diff --git a/app/src/main/java/com/sevtinge/cemiuiler/ui/SystemUIPluginActivity.java b/app/src/main/java/com/sevtinge/cemiuiler/ui/SystemUIPluginActivity.java index 9ea2ef4e68..644c563d9f 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/ui/SystemUIPluginActivity.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/ui/SystemUIPluginActivity.java @@ -1,6 +1,7 @@ package com.sevtinge.cemiuiler.ui; import androidx.fragment.app.Fragment; + import com.sevtinge.cemiuiler.R; import com.sevtinge.cemiuiler.ui.base.BaseAppCompatActivity; import com.sevtinge.cemiuiler.ui.base.SubFragment; diff --git a/app/src/main/java/com/sevtinge/cemiuiler/ui/TsmClientActivity.java b/app/src/main/java/com/sevtinge/cemiuiler/ui/TsmClientActivity.java index f3a2d16278..9225e66f0d 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/ui/TsmClientActivity.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/ui/TsmClientActivity.java @@ -1,24 +1,25 @@ package com.sevtinge.cemiuiler.ui; import androidx.fragment.app.Fragment; + import com.sevtinge.cemiuiler.R; import com.sevtinge.cemiuiler.ui.base.BaseAppCompatActivity; import com.sevtinge.cemiuiler.ui.base.SubFragment; public class TsmClientActivity extends BaseAppCompatActivity { - @Override - public Fragment initFragment() { - return new com.sevtinge.cemiuiler.ui.TsmClientActivity.TsmClientFragment(); - } + @Override + public Fragment initFragment() { + return new com.sevtinge.cemiuiler.ui.TsmClientActivity.TsmClientFragment(); + } - public static class TsmClientFragment extends SubFragment { + public static class TsmClientFragment extends SubFragment { - @Override - public int getContentResId() { - return R.xml.tsmclient; - } + @Override + public int getContentResId() { + return R.xml.tsmclient; } + } - } +} diff --git a/app/src/main/java/com/sevtinge/cemiuiler/ui/UpdaterActivity.java b/app/src/main/java/com/sevtinge/cemiuiler/ui/UpdaterActivity.java index 37129bddc4..9a7eaf404d 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/ui/UpdaterActivity.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/ui/UpdaterActivity.java @@ -1,6 +1,7 @@ package com.sevtinge.cemiuiler.ui; import androidx.fragment.app.Fragment; + import com.sevtinge.cemiuiler.R; import com.sevtinge.cemiuiler.ui.base.BaseAppCompatActivity; import com.sevtinge.cemiuiler.ui.base.SubFragment; diff --git a/app/src/main/java/com/sevtinge/cemiuiler/ui/VariousActivity.java b/app/src/main/java/com/sevtinge/cemiuiler/ui/VariousActivity.java index c0ff7c78f3..d38a9a2e7b 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/ui/VariousActivity.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/ui/VariousActivity.java @@ -8,8 +8,8 @@ import com.sevtinge.cemiuiler.R; import com.sevtinge.cemiuiler.ui.base.BaseAppCompatActivity; import com.sevtinge.cemiuiler.ui.base.SubFragment; - import com.sevtinge.cemiuiler.utils.SdkHelper; + import moralnorm.preference.SwitchPreference; public class VariousActivity extends BaseAppCompatActivity { diff --git a/app/src/main/java/com/sevtinge/cemiuiler/ui/WeatherActivity.java b/app/src/main/java/com/sevtinge/cemiuiler/ui/WeatherActivity.java index c464332ba4..f6a3580dc1 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/ui/WeatherActivity.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/ui/WeatherActivity.java @@ -1,26 +1,27 @@ package com.sevtinge.cemiuiler.ui; import androidx.fragment.app.Fragment; + import com.sevtinge.cemiuiler.R; import com.sevtinge.cemiuiler.ui.base.BaseAppCompatActivity; import com.sevtinge.cemiuiler.ui.base.SubFragment; public class WeatherActivity extends BaseAppCompatActivity { - @Override - public Fragment initFragment() { - return new com.sevtinge.cemiuiler.ui.WeatherActivity.WeatherFragment(); - } + @Override + public Fragment initFragment() { + return new com.sevtinge.cemiuiler.ui.WeatherActivity.WeatherFragment(); + } - public static class WeatherFragment extends SubFragment { + public static class WeatherFragment extends SubFragment { - @Override - public int getContentResId() { - return R.xml.weather; - } + @Override + public int getContentResId() { + return R.xml.weather; } + } - } +} diff --git a/app/src/main/java/com/sevtinge/cemiuiler/ui/base/BaseAppCompatActivity.java b/app/src/main/java/com/sevtinge/cemiuiler/ui/base/BaseAppCompatActivity.java index e2b5ea00ad..2ab792e067 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/ui/base/BaseAppCompatActivity.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/ui/base/BaseAppCompatActivity.java @@ -1,12 +1,10 @@ package com.sevtinge.cemiuiler.ui.base; +import static com.sevtinge.cemiuiler.utils.KotlinXposedHelperKt.exec; + import android.content.Intent; import android.os.Bundle; -import android.text.Editable; import android.text.TextWatcher; -import android.view.ActionMode; -import android.view.Menu; -import android.view.MenuItem; import android.view.View; import android.view.ViewGroup; import android.widget.ImageView; @@ -24,8 +22,6 @@ import moralnorm.appcompat.internal.view.SearchActionMode; import moralnorm.internal.utils.ViewUtils; -import static com.sevtinge.cemiuiler.utils.KotlinXposedHelperKt.exec; - public abstract class BaseAppCompatActivity extends AppCompatActivity { ImageView mRestartView; @@ -44,11 +40,11 @@ protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); setActionBarEndViewEnable(false); - if (initFragment() != null ) { + if (initFragment() != null) { getSupportFragmentManager() - .beginTransaction() - .replace(R.id.fragment_container, initFragment()) - .commit(); + .beginTransaction() + .replace(R.id.fragment_container, initFragment()) + .commit(); } showXposedDialog(); initView(); @@ -75,24 +71,24 @@ public void setActionBarEndViewEnable(boolean isEnable) { public void showRestartSystemDialog() { new AlertDialog.Builder(this) - .setCancelable(false) - .setTitle(R.string.soft_reboot) - .setMessage(R.string.soft_reboot_desc) - .setHapticFeedbackEnabled(true) - .setPositiveButton(android.R.string.ok, (dialog, which) -> exec("reboot")) - .setNegativeButton(android.R.string.cancel, null) - .show(); + .setCancelable(false) + .setTitle(R.string.soft_reboot) + .setMessage(R.string.soft_reboot_desc) + .setHapticFeedbackEnabled(true) + .setPositiveButton(android.R.string.ok, (dialog, which) -> exec("reboot")) + .setNegativeButton(android.R.string.cancel, null) + .show(); } public void showRestartSystemUIDialog() { new AlertDialog.Builder(this) - .setCancelable(false) - .setTitle(R.string.restart_systemui) - .setMessage(R.string.restart_systemui_desc) - .setHapticFeedbackEnabled(true) - .setPositiveButton(android.R.string.ok, (dialog, which) -> restartSystemUI()) - .setNegativeButton(android.R.string.cancel, null) - .show(); + .setCancelable(false) + .setTitle(R.string.restart_systemui) + .setMessage(R.string.restart_systemui_desc) + .setHapticFeedbackEnabled(true) + .setPositiveButton(android.R.string.ok, (dialog, which) -> restartSystemUI()) + .setNegativeButton(android.R.string.cancel, null) + .show(); } public void restartSystemUI() { @@ -101,13 +97,13 @@ public void restartSystemUI() { public void showRestartAppsDialog(String appLabel, String packagename) { new AlertDialog.Builder(this) - .setCancelable(false) - .setTitle(getResources().getString(R.string.soft_reboot) + appLabel) - .setMessage(getResources().getString(R.string.restart_app_desc1) + appLabel + getResources().getString(R.string.restart_app_desc2)) - .setHapticFeedbackEnabled(true) - .setPositiveButton(android.R.string.ok, (dialog, which) -> setRestartApps(packagename)) - .setNegativeButton(android.R.string.cancel, null) - .show(); + .setCancelable(false) + .setTitle(getResources().getString(R.string.soft_reboot) + appLabel) + .setMessage(getResources().getString(R.string.restart_app_desc1) + appLabel + getResources().getString(R.string.restart_app_desc2)) + .setHapticFeedbackEnabled(true) + .setPositiveButton(android.R.string.ok, (dialog, which) -> setRestartApps(packagename)) + .setNegativeButton(android.R.string.cancel, null) + .show(); } public void setRestartApps(String packagename) { @@ -116,19 +112,19 @@ public void setRestartApps(String packagename) { sendBroadcast(intent); } - public void startActivity(AppCompatActivity activity,Class cls) { - startActivity(new Intent(activity,cls)); + public void startActivity(AppCompatActivity activity, Class cls) { + startActivity(new Intent(activity, cls)); } public void showXposedDialog() { if (!Helpers.isModuleActive) { new AlertDialog.Builder(this) - .setCancelable(false) - .setTitle(R.string.tip) - .setMessage(R.string.hook_failed) - .setHapticFeedbackEnabled(true) - .setPositiveButton(android.R.string.ok ,(dialog, which) -> finish()) - .show(); + .setCancelable(false) + .setTitle(R.string.tip) + .setMessage(R.string.hook_failed) + .setHapticFeedbackEnabled(true) + .setPositiveButton(android.R.string.ok, (dialog, which) -> finish()) + .show(); } } diff --git a/app/src/main/java/com/sevtinge/cemiuiler/ui/base/BasePreferenceFragment.java b/app/src/main/java/com/sevtinge/cemiuiler/ui/base/BasePreferenceFragment.java index 40df1d0288..f71334b385 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/ui/base/BasePreferenceFragment.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/ui/base/BasePreferenceFragment.java @@ -5,7 +5,6 @@ import com.sevtinge.cemiuiler.utils.PrefsUtils; -import moralnorm.preference.PreferenceFragmentCompat; import moralnorm.preference.PreferenceManager; import moralnorm.preference.material.MaterialPreferenceFragmentCompat; diff --git a/app/src/main/java/com/sevtinge/cemiuiler/ui/base/SubFragment.java b/app/src/main/java/com/sevtinge/cemiuiler/ui/base/SubFragment.java index c744829362..8fdb831433 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/ui/base/SubFragment.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/ui/base/SubFragment.java @@ -17,7 +17,7 @@ public abstract class SubFragment extends BasePreferenceFragment { public void onCreate(Bundle savedInstanceState) { mContentResId = getContentResId(); if (mContentResId != 0) { - super.onCreate(savedInstanceState,mContentResId); + super.onCreate(savedInstanceState, mContentResId); addPreferencesFromResource(mContentResId); } else { super.onCreate(savedInstanceState); @@ -28,7 +28,8 @@ public void onCreate(Bundle savedInstanceState) { public abstract int getContentResId(); - public void initPrefs() {} + public void initPrefs() { + } public void openMultiAction(Preference preference, Bundle args, PickerHomeActivity.Actions actions) { Intent intent = new Intent(getContext(), PickerHomeActivity.class); @@ -49,7 +50,6 @@ public void openSubFragment(Bundle args, PickerHomeActivity.Actions actions) { } - public SharedPreferences getSharedPreferences() { return PrefsUtils.mSharedPreferences; } diff --git a/app/src/main/java/com/sevtinge/cemiuiler/ui/home/HomeDockActivity.java b/app/src/main/java/com/sevtinge/cemiuiler/ui/home/HomeDockActivity.java index 7931ce8d8c..14ed0b0b9d 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/ui/home/HomeDockActivity.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/ui/home/HomeDockActivity.java @@ -6,12 +6,8 @@ import com.sevtinge.cemiuiler.ui.PickerHomeActivity; import com.sevtinge.cemiuiler.ui.base.SubFragment; import com.sevtinge.cemiuiler.ui.home.base.BaseHomeActivity; -import com.sevtinge.cemiuiler.utils.PrefsUtils; -import moralnorm.os.SdkVersion; import moralnorm.preference.Preference; -import moralnorm.preference.PreferenceCategory; -import moralnorm.preference.SwitchPreference; public class HomeDockActivity extends BaseHomeActivity { diff --git a/app/src/main/java/com/sevtinge/cemiuiler/ui/home/HomeDrawerActivity.java b/app/src/main/java/com/sevtinge/cemiuiler/ui/home/HomeDrawerActivity.java index 83022932e7..af1733a271 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/ui/home/HomeDrawerActivity.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/ui/home/HomeDrawerActivity.java @@ -5,9 +5,9 @@ import com.sevtinge.cemiuiler.R; import com.sevtinge.cemiuiler.ui.base.SubFragment; import com.sevtinge.cemiuiler.ui.home.base.BaseHomeActivity; +import com.sevtinge.cemiuiler.utils.SdkHelper; import moralnorm.preference.SwitchPreference; -import com.sevtinge.cemiuiler.utils.SdkHelper; public class HomeDrawerActivity extends BaseHomeActivity { @@ -34,4 +34,4 @@ public void initPrefs() { } } -} \ No newline at end of file +} diff --git a/app/src/main/java/com/sevtinge/cemiuiler/ui/home/HomeFolderActivity.java b/app/src/main/java/com/sevtinge/cemiuiler/ui/home/HomeFolderActivity.java index 7b2e9cb157..510799d633 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/ui/home/HomeFolderActivity.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/ui/home/HomeFolderActivity.java @@ -8,7 +8,10 @@ import com.sevtinge.cemiuiler.ui.home.base.BaseHomeActivity; import com.sevtinge.cemiuiler.utils.PrefsUtils; -import moralnorm.preference.*; +import moralnorm.preference.DropDownPreference; +import moralnorm.preference.Preference; +import moralnorm.preference.SeekBarPreference; +import moralnorm.preference.SwitchPreference; public class HomeFolderActivity extends BaseHomeActivity { diff --git a/app/src/main/java/com/sevtinge/cemiuiler/ui/home/HomeOtherActivity.java b/app/src/main/java/com/sevtinge/cemiuiler/ui/home/HomeOtherActivity.java index e6ebef3f86..0e0e4f73f4 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/ui/home/HomeOtherActivity.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/ui/home/HomeOtherActivity.java @@ -6,7 +6,7 @@ import com.sevtinge.cemiuiler.ui.base.SubFragment; import com.sevtinge.cemiuiler.ui.home.base.BaseHomeActivity; import com.sevtinge.cemiuiler.utils.SdkHelper; -import moralnorm.os.SdkVersion; + import moralnorm.preference.SwitchPreference; public class HomeOtherActivity extends BaseHomeActivity { diff --git a/app/src/main/java/com/sevtinge/cemiuiler/ui/home/HomeRecentActivity.java b/app/src/main/java/com/sevtinge/cemiuiler/ui/home/HomeRecentActivity.java index 3c6cf6efd1..01c3203aac 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/ui/home/HomeRecentActivity.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/ui/home/HomeRecentActivity.java @@ -1,6 +1,7 @@ package com.sevtinge.cemiuiler.ui.home; import androidx.fragment.app.Fragment; + import com.sevtinge.cemiuiler.R; import com.sevtinge.cemiuiler.ui.base.SubFragment; import com.sevtinge.cemiuiler.ui.home.base.BaseHomeActivity; diff --git a/app/src/main/java/com/sevtinge/cemiuiler/ui/home/HomeTitleActivity.java b/app/src/main/java/com/sevtinge/cemiuiler/ui/home/HomeTitleActivity.java index 454fbb95fc..2a1331f14e 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/ui/home/HomeTitleActivity.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/ui/home/HomeTitleActivity.java @@ -7,6 +7,7 @@ import com.sevtinge.cemiuiler.ui.base.SubFragment; import com.sevtinge.cemiuiler.ui.home.base.BaseHomeActivity; import com.sevtinge.cemiuiler.utils.SdkHelper; + import moralnorm.preference.SwitchPreference; public class HomeTitleActivity extends BaseHomeActivity { diff --git a/app/src/main/java/com/sevtinge/cemiuiler/ui/main/fragment/MainFragment.java b/app/src/main/java/com/sevtinge/cemiuiler/ui/main/fragment/MainFragment.java index 5ab86e93ff..905d911aa3 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/ui/main/fragment/MainFragment.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/ui/main/fragment/MainFragment.java @@ -4,8 +4,8 @@ import com.sevtinge.cemiuiler.R; import com.sevtinge.cemiuiler.ui.base.SubFragment; - import com.sevtinge.cemiuiler.utils.SdkHelper; + import moralnorm.preference.Preference; public class MainFragment extends SubFragment { diff --git a/app/src/main/java/com/sevtinge/cemiuiler/ui/sub/AppPickerFragment.java b/app/src/main/java/com/sevtinge/cemiuiler/ui/sub/AppPickerFragment.java index c1e0bffde7..9070807355 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/ui/sub/AppPickerFragment.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/ui/sub/AppPickerFragment.java @@ -18,8 +18,8 @@ import androidx.recyclerview.widget.RecyclerView; import com.sevtinge.cemiuiler.R; -import com.sevtinge.cemiuiler.data.adapter.AppDataAdapter; import com.sevtinge.cemiuiler.data.AppData; +import com.sevtinge.cemiuiler.data.adapter.AppDataAdapter; import com.sevtinge.cemiuiler.provider.SharedPrefsProvider; import com.sevtinge.cemiuiler.utils.PrefsUtils; @@ -114,9 +114,10 @@ public void run() { /** * 该方法提供了用于判断一个程序是系统程序还是用户程序的功能。 + * * @param applicationInfo * @return true 用户自己安装的软件 - * fasle 系统软件. + * fasle 系统软件. */ public static boolean filterApp(ApplicationInfo applicationInfo) { if ((applicationInfo.flags & ApplicationInfo.FLAG_UPDATED_SYSTEM_APP) != 0) { @@ -128,7 +129,6 @@ public static boolean filterApp(ApplicationInfo applicationInfo) { } - public void getOpenWithApps(Context context, List appInfoList) { PackageManager pm = context.getPackageManager(); @@ -161,24 +161,25 @@ public void getOpenWithApps(Context context, List appInfoList) { packs.addAll(packs4); AppData app; - for (ResolveInfo pack: packs) try { - boolean exists = false; - for (AppData openWithApp: appInfoList) { - if (openWithApp.packageName.equals(pack.activityInfo.applicationInfo.packageName)) { - exists = true; - break; + for (ResolveInfo pack : packs) + try { + boolean exists = false; + for (AppData openWithApp : appInfoList) { + if (openWithApp.packageName.equals(pack.activityInfo.applicationInfo.packageName)) { + exists = true; + break; + } } + if (exists) continue; + app = new AppData(); + app.icon = pack.activityInfo.applicationInfo.loadIcon(pm); + app.packageName = pack.activityInfo.applicationInfo.packageName; + app.enabled = pack.activityInfo.applicationInfo.enabled; + app.label = pack.activityInfo.applicationInfo.loadLabel(pm).toString(); + appInfoList.add(app); + } catch (Throwable e) { + e.printStackTrace(); } - if (exists) continue; - app = new AppData(); - app.icon = pack.activityInfo.applicationInfo.loadIcon(pm); - app.packageName = pack.activityInfo.applicationInfo.packageName; - app.enabled = pack.activityInfo.applicationInfo.enabled; - app.label = pack.activityInfo.applicationInfo.loadLabel(pm).toString(); - appInfoList.add(app); - } catch (Throwable e) { - e.printStackTrace(); - } } diff --git a/app/src/main/java/com/sevtinge/cemiuiler/ui/sub/CustomBackgroundSettings.java b/app/src/main/java/com/sevtinge/cemiuiler/ui/sub/CustomBackgroundSettings.java index 295ad80113..9c3569e31f 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/ui/sub/CustomBackgroundSettings.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/ui/sub/CustomBackgroundSettings.java @@ -6,7 +6,10 @@ import com.sevtinge.cemiuiler.ui.base.SubFragment; import com.sevtinge.cemiuiler.utils.PrefsUtils; -import moralnorm.preference.*; +import moralnorm.preference.ColorPickerPreference; +import moralnorm.preference.Preference; +import moralnorm.preference.SeekBarPreference; +import moralnorm.preference.SwitchPreference; public class CustomBackgroundSettings extends SubFragment implements Preference.OnPreferenceChangeListener { @@ -97,13 +100,13 @@ public boolean onPreferenceChange(Preference preference, Object o) { if (preference == mBlurEnabled) { setBlurEnabled(!mBlurEnabled.isChecked()); } else if (preference == mBlurRadius) { - setBackgroundBlurRadius((int)o); + setBackgroundBlurRadius((int) o); } else if (preference == mColor) { setBackgroundColor((int) o); } else if (preference == mColorAlpha) { - setBackgroundColorAlpha((int)o); + setBackgroundColorAlpha((int) o); } else if (preference == mCornerRadius) { - setBackgroundCornerRadius((int)o); + setBackgroundCornerRadius((int) o); } return false; } diff --git a/app/src/main/java/com/sevtinge/cemiuiler/ui/sub/MultiAction.java b/app/src/main/java/com/sevtinge/cemiuiler/ui/sub/MultiAction.java index 4341254609..dccdb11af3 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/ui/sub/MultiAction.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/ui/sub/MultiAction.java @@ -76,28 +76,17 @@ public boolean onPreferenceTreeClick(Preference preference) { public void updateControls(String actionKey, String key) { switch (actionKey) { - case "prefs_key_no_action" -> - PrefsUtils.mSharedPreferences.edit().putInt(key, 0).apply(); - case "prefs_key_open_notification_center" -> - PrefsUtils.mSharedPreferences.edit().putInt(key, 1).apply(); - case "prefs_key_clear_memory" -> - PrefsUtils.mSharedPreferences.edit().putInt(key, 2).apply(); - case "prefs_key_invert_colors" -> - PrefsUtils.mSharedPreferences.edit().putInt(key, 3).apply(); - case "prefs_key_screen_lock" -> - PrefsUtils.mSharedPreferences.edit().putInt(key, 4).apply(); - case "prefs_key_screen_sleep" -> - PrefsUtils.mSharedPreferences.edit().putInt(key, 5).apply(); - case "prefs_key_screen_capture" -> - PrefsUtils.mSharedPreferences.edit().putInt(key, 6).apply(); - case "prefs_key_screen_recents" -> - PrefsUtils.mSharedPreferences.edit().putInt(key, 7).apply(); - case "prefs_key_volume_dialog" -> - PrefsUtils.mSharedPreferences.edit().putInt(key, 8).apply(); - case "prefs_key_open_powermenu" -> - PrefsUtils.mSharedPreferences.edit().putInt(key, 12).apply(); - case "prefs_key_open_app" -> - PrefsUtils.mSharedPreferences.edit().putInt(key, 13).apply(); + case "prefs_key_no_action" -> PrefsUtils.mSharedPreferences.edit().putInt(key, 0).apply(); + case "prefs_key_open_notification_center" -> PrefsUtils.mSharedPreferences.edit().putInt(key, 1).apply(); + case "prefs_key_clear_memory" -> PrefsUtils.mSharedPreferences.edit().putInt(key, 2).apply(); + case "prefs_key_invert_colors" -> PrefsUtils.mSharedPreferences.edit().putInt(key, 3).apply(); + case "prefs_key_screen_lock" -> PrefsUtils.mSharedPreferences.edit().putInt(key, 4).apply(); + case "prefs_key_screen_sleep" -> PrefsUtils.mSharedPreferences.edit().putInt(key, 5).apply(); + case "prefs_key_screen_capture" -> PrefsUtils.mSharedPreferences.edit().putInt(key, 6).apply(); + case "prefs_key_screen_recents" -> PrefsUtils.mSharedPreferences.edit().putInt(key, 7).apply(); + case "prefs_key_volume_dialog" -> PrefsUtils.mSharedPreferences.edit().putInt(key, 8).apply(); + case "prefs_key_open_powermenu" -> PrefsUtils.mSharedPreferences.edit().putInt(key, 12).apply(); + case "prefs_key_open_app" -> PrefsUtils.mSharedPreferences.edit().putInt(key, 13).apply(); case "prefs_key_open_app_selector" -> { Bundle args = new Bundle(); args.putString("title", getResources().getString(R.string.home_gesture_multi_choose_app)); @@ -130,6 +119,7 @@ private void setValue() { } } } + String a; public void updateAppTitle(String title) { diff --git a/app/src/main/java/com/sevtinge/cemiuiler/ui/systemframework/FreeFormSettings.java b/app/src/main/java/com/sevtinge/cemiuiler/ui/systemframework/FreeFormSettings.java index fe08734c55..3c285423ff 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/ui/systemframework/FreeFormSettings.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/ui/systemframework/FreeFormSettings.java @@ -19,8 +19,8 @@ public Fragment initFragment() { public static class FreeFormFragment extends SubFragment { - SwitchPreference mMoreFreeForm; //多小窗 - PreferenceCategory mSmallFreeForm; //小窗气泡 + SwitchPreference mMoreFreeForm; // 多小窗 + PreferenceCategory mSmallFreeForm; // 小窗气泡 @Override public int getContentResId() { @@ -36,4 +36,4 @@ public void initPrefs() { mSmallFreeForm.setVisible(!SdkHelper.isAndroidR()); } } -} \ No newline at end of file +} diff --git a/app/src/main/java/com/sevtinge/cemiuiler/ui/systemframework/NetworkSettings.java b/app/src/main/java/com/sevtinge/cemiuiler/ui/systemframework/NetworkSettings.java index a2ecb65b9a..9adf0b2080 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/ui/systemframework/NetworkSettings.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/ui/systemframework/NetworkSettings.java @@ -1,6 +1,7 @@ package com.sevtinge.cemiuiler.ui.systemframework; import androidx.fragment.app.Fragment; + import com.sevtinge.cemiuiler.R; import com.sevtinge.cemiuiler.ui.base.PreferenceFragment; import com.sevtinge.cemiuiler.ui.systemframework.base.BaseSystemFrameWorkActivity; diff --git a/app/src/main/java/com/sevtinge/cemiuiler/ui/systemframework/OtherSettings.java b/app/src/main/java/com/sevtinge/cemiuiler/ui/systemframework/OtherSettings.java index 57a5c214cb..df979a6e35 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/ui/systemframework/OtherSettings.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/ui/systemframework/OtherSettings.java @@ -4,7 +4,6 @@ import android.content.DialogInterface; import android.content.Intent; import android.net.Uri; -import android.os.Build; import android.os.Bundle; import android.view.Menu; import android.view.MenuItem; @@ -14,13 +13,11 @@ import com.sevtinge.cemiuiler.R; import com.sevtinge.cemiuiler.provider.SharedPrefsProvider; import com.sevtinge.cemiuiler.ui.PickerHomeActivity; -import com.sevtinge.cemiuiler.ui.base.SubFragment; import com.sevtinge.cemiuiler.ui.base.BaseAppCompatActivity; - +import com.sevtinge.cemiuiler.ui.base.SubFragment; import com.sevtinge.cemiuiler.utils.SdkHelper; -import de.robv.android.xposed.XposedBridge; + import moralnorm.appcompat.app.AlertDialog; -import moralnorm.os.SdkVersion; import moralnorm.preference.Preference; import moralnorm.preference.SwitchPreference; @@ -94,32 +91,32 @@ public boolean onOptionsItemSelected(MenuItem item) { sendIntent.setType("*/*"); startActivity(Intent.createChooser(sendIntent, null)); } else if (item.getItemId() == R.id.system_framework_open_with_menu_test) { - Intent viewIntent = new Intent(); - viewIntent.setAction(Intent.ACTION_VIEW); - new AlertDialog.Builder(this) - .setTitle("请选择要测试的数据类型") - .setItems(R.array.open_with_test, new DialogInterface.OnClickListener() { - @Override - public void onClick(DialogInterface dialog, int which) { - String type = "*/*"; - if (which == 0) { - type = "image/*"; - } else if (which == 1) { - type = "audio/*"; - } else if (which == 2) { - type = "video/*"; - } else if (which == 3) { - type = "text/*"; - } else if (which == 4) { - type = "application/zip"; - } - viewIntent.setDataAndType(Uri.parse("content://" + SharedPrefsProvider.AUTHORITY + "/test/" + which), type); - startActivity(Intent.createChooser(viewIntent, null)); - } - }) - .setNeutralButton(android.R.string.cancel, (dialog, which) -> { - }) - .show(); + Intent viewIntent = new Intent(); + viewIntent.setAction(Intent.ACTION_VIEW); + new AlertDialog.Builder(this) + .setTitle("请选择要测试的数据类型") + .setItems(R.array.open_with_test, new DialogInterface.OnClickListener() { + @Override + public void onClick(DialogInterface dialog, int which) { + String type = "*/*"; + if (which == 0) { + type = "image/*"; + } else if (which == 1) { + type = "audio/*"; + } else if (which == 2) { + type = "video/*"; + } else if (which == 3) { + type = "text/*"; + } else if (which == 4) { + type = "application/zip"; + } + viewIntent.setDataAndType(Uri.parse("content://" + SharedPrefsProvider.AUTHORITY + "/test/" + which), type); + startActivity(Intent.createChooser(viewIntent, null)); + } + }) + .setNeutralButton(android.R.string.cancel, (dialog, which) -> { + }) + .show(); } return super.onOptionsItemSelected(item); } diff --git a/app/src/main/java/com/sevtinge/cemiuiler/ui/systemframework/VolumeSettings.java b/app/src/main/java/com/sevtinge/cemiuiler/ui/systemframework/VolumeSettings.java index 29469c30b0..79f02d9cc5 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/ui/systemframework/VolumeSettings.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/ui/systemframework/VolumeSettings.java @@ -31,7 +31,7 @@ public void initPrefs() { mDefaultVolumeStream = findPreference("prefs_key_system_framework_default_volume_stream"); mDefaultVolumeStream.setOnPreferenceChangeListener((preference, o) -> { - Settings.Secure.putInt(getContext().getContentResolver(),"system_framework_default_volume_stream", Integer.parseInt((String) o)); + Settings.Secure.putInt(getContext().getContentResolver(), "system_framework_default_volume_stream", Integer.parseInt((String) o)); return true; }); } diff --git a/app/src/main/java/com/sevtinge/cemiuiler/ui/systemui/ControlCenterActivity.java b/app/src/main/java/com/sevtinge/cemiuiler/ui/systemui/ControlCenterActivity.java index 3357fa48b1..3bdda32cf9 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/ui/systemui/ControlCenterActivity.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/ui/systemui/ControlCenterActivity.java @@ -34,7 +34,7 @@ public void initPrefs() { mFixMediaPanel = findPreference("prefs_key_system_ui_control_center_fix_media_control_panel"); mFixMediaPanel.setVisible(SdkHelper.isAndroidS() || SdkHelper.isAndroidSv2()); - ((SeekBarPreferenceEx)findPreference("prefs_key_system_control_center_old_qs_grid_columns")).setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() { + ((SeekBarPreferenceEx) findPreference("prefs_key_system_control_center_old_qs_grid_columns")).setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() { @Override public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) { if (!fromUser) return; @@ -47,10 +47,12 @@ public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) { } @Override - public void onStartTrackingTouch(SeekBar seekBar) {} + public void onStartTrackingTouch(SeekBar seekBar) { + } @Override - public void onStopTrackingTouch(SeekBar seekBar) {} + public void onStopTrackingTouch(SeekBar seekBar) { + } }); } } diff --git a/app/src/main/java/com/sevtinge/cemiuiler/ui/systemui/DisplayActivity.java b/app/src/main/java/com/sevtinge/cemiuiler/ui/systemui/DisplayActivity.java index a4db2e4042..b76723f1ee 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/ui/systemui/DisplayActivity.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/ui/systemui/DisplayActivity.java @@ -1,49 +1,51 @@ -package com.sevtinge.cemiuiler.ui.systemui; +package com.sevtinge.cemiuiler.ui.systemui; - import android.widget.SeekBar; +import android.widget.SeekBar; - import androidx.fragment.app.Fragment; - - import com.sevtinge.cemiuiler.R; - import com.sevtinge.cemiuiler.prefs.SeekBarPreferenceEx; - import com.sevtinge.cemiuiler.ui.base.SubFragment; - import com.sevtinge.cemiuiler.ui.systemui.base.BaseSystemUIActivity; +import androidx.fragment.app.Fragment; + +import com.sevtinge.cemiuiler.R; +import com.sevtinge.cemiuiler.prefs.SeekBarPreferenceEx; +import com.sevtinge.cemiuiler.ui.base.SubFragment; +import com.sevtinge.cemiuiler.ui.systemui.base.BaseSystemUIActivity; public class DisplayActivity extends BaseSystemUIActivity { - @Override - public Fragment initFragment() { - return new SystemUIDisplayFragment(); - } - - public static class SystemUIDisplayFragment extends SubFragment { - - SeekBarPreferenceEx minBrightness; - SeekBarPreferenceEx maxBrightness; - - @Override - public int getContentResId() { - return R.xml.system_ui_display; - } - - @Override - public void initPrefs() { - maxBrightness = findPreference("pref_key_system_ui_auto_brightness_max"); - minBrightness = findPreference("pref_key_system_ui_auto_brightness_min"); - assert minBrightness != null; - minBrightness.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() { - @Override - public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) { - if (!fromUser) return; - if (maxBrightness.getValue() <= progress) maxBrightness.setValue(progress + 1); - maxBrightness.setMinValue(progress + 1); - } - - @Override - public void onStartTrackingTouch(SeekBar seekBar) {} - - @Override - public void onStopTrackingTouch(SeekBar seekBar) {} - }); - } - } - } \ No newline at end of file + @Override + public Fragment initFragment() { + return new SystemUIDisplayFragment(); + } + + public static class SystemUIDisplayFragment extends SubFragment { + + SeekBarPreferenceEx minBrightness; + SeekBarPreferenceEx maxBrightness; + + @Override + public int getContentResId() { + return R.xml.system_ui_display; + } + + @Override + public void initPrefs() { + maxBrightness = findPreference("pref_key_system_ui_auto_brightness_max"); + minBrightness = findPreference("pref_key_system_ui_auto_brightness_min"); + assert minBrightness != null; + minBrightness.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() { + @Override + public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) { + if (!fromUser) return; + if (maxBrightness.getValue() <= progress) maxBrightness.setValue(progress + 1); + maxBrightness.setMinValue(progress + 1); + } + + @Override + public void onStartTrackingTouch(SeekBar seekBar) { + } + + @Override + public void onStopTrackingTouch(SeekBar seekBar) { + } + }); + } + } +} diff --git a/app/src/main/java/com/sevtinge/cemiuiler/ui/systemui/NavigationActivity.java b/app/src/main/java/com/sevtinge/cemiuiler/ui/systemui/NavigationActivity.java index e247b6ada5..4bc3bb0352 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/ui/systemui/NavigationActivity.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/ui/systemui/NavigationActivity.java @@ -1,6 +1,7 @@ package com.sevtinge.cemiuiler.ui.systemui; import androidx.fragment.app.Fragment; + import com.sevtinge.cemiuiler.R; import com.sevtinge.cemiuiler.ui.base.SubFragment; import com.sevtinge.cemiuiler.ui.systemui.base.BaseSystemUIActivity; @@ -22,7 +23,6 @@ public int getContentResId() { } - } } diff --git a/app/src/main/java/com/sevtinge/cemiuiler/ui/systemui/OtherActivity.java b/app/src/main/java/com/sevtinge/cemiuiler/ui/systemui/OtherActivity.java index 8add993fd7..57745846a7 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/ui/systemui/OtherActivity.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/ui/systemui/OtherActivity.java @@ -1,14 +1,12 @@ package com.sevtinge.cemiuiler.ui.systemui; -import android.os.Build; import androidx.fragment.app.Fragment; import com.sevtinge.cemiuiler.R; import com.sevtinge.cemiuiler.ui.base.SubFragment; import com.sevtinge.cemiuiler.ui.systemui.base.BaseSystemUIActivity; - import com.sevtinge.cemiuiler.utils.SdkHelper; -import moralnorm.os.SdkVersion; + import moralnorm.preference.PreferenceCategory; public class OtherActivity extends BaseSystemUIActivity { diff --git a/app/src/main/java/com/sevtinge/cemiuiler/ui/systemui/StatusBarActivity.java b/app/src/main/java/com/sevtinge/cemiuiler/ui/systemui/StatusBarActivity.java index abb323db2f..f4c9298561 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/ui/systemui/StatusBarActivity.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/ui/systemui/StatusBarActivity.java @@ -18,7 +18,7 @@ public Fragment initFragment() { public static class StatusBarFragment extends SubFragment { - Preference mDeviceStatus; //硬件指示器 + Preference mDeviceStatus; // 硬件指示器 @Override public int getContentResId() { diff --git a/app/src/main/java/com/sevtinge/cemiuiler/ui/systemui/statusbar/BatteryIndicatorActivity.java b/app/src/main/java/com/sevtinge/cemiuiler/ui/systemui/statusbar/BatteryIndicatorActivity.java index 1f2352ead6..d2aa834030 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/ui/systemui/statusbar/BatteryIndicatorActivity.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/ui/systemui/statusbar/BatteryIndicatorActivity.java @@ -9,8 +9,6 @@ import com.sevtinge.cemiuiler.ui.systemui.base.BaseSystemUIActivity; import com.sevtinge.cemiuiler.utils.PrefsUtils; -import java.util.Objects; - import moralnorm.preference.ColorPickerPreference; import moralnorm.preference.DropDownPreference; import moralnorm.preference.Preference; diff --git a/app/src/main/java/com/sevtinge/cemiuiler/ui/systemui/statusbar/ClockIndicatorActivity.java b/app/src/main/java/com/sevtinge/cemiuiler/ui/systemui/statusbar/ClockIndicatorActivity.java index 09295227bc..06ab44c583 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/ui/systemui/statusbar/ClockIndicatorActivity.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/ui/systemui/statusbar/ClockIndicatorActivity.java @@ -44,7 +44,7 @@ public void initPrefs() { @Override public boolean onPreferenceChange(Preference preference, Object o) { if (preference == mClockModePreference) { - setClockMode(Integer.parseInt((String)o)); + setClockMode(Integer.parseInt((String) o)); } return true; } @@ -55,4 +55,4 @@ private void setClockMode(int mode) { } } -} \ No newline at end of file +} diff --git a/app/src/main/java/com/sevtinge/cemiuiler/ui/systemui/statusbar/DoubleLineNetworkActivity.java b/app/src/main/java/com/sevtinge/cemiuiler/ui/systemui/statusbar/DoubleLineNetworkActivity.java index a61efe9c0e..27301be1f0 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/ui/systemui/statusbar/DoubleLineNetworkActivity.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/ui/systemui/statusbar/DoubleLineNetworkActivity.java @@ -1,6 +1,7 @@ package com.sevtinge.cemiuiler.ui.systemui.statusbar; import androidx.fragment.app.Fragment; + import com.sevtinge.cemiuiler.R; import com.sevtinge.cemiuiler.ui.base.SubFragment; import com.sevtinge.cemiuiler.ui.systemui.base.BaseSystemUIActivity; @@ -19,4 +20,4 @@ public int getContentResId() { } } -} \ No newline at end of file +} diff --git a/app/src/main/java/com/sevtinge/cemiuiler/ui/systemui/statusbar/IconManageActivity.java b/app/src/main/java/com/sevtinge/cemiuiler/ui/systemui/statusbar/IconManageActivity.java index 202a2bb504..75d71bc249 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/ui/systemui/statusbar/IconManageActivity.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/ui/systemui/statusbar/IconManageActivity.java @@ -20,7 +20,7 @@ public Fragment initFragment() { } public static class IconManageFragment extends SubFragment { - + Preference UseNewHD; DropDownPreference IconNewHD; DropDownPreference mAlarmClockIcon; @@ -37,7 +37,7 @@ public void initPrefs() { mAlarmClockIcon = findPreference("prefs_key_system_ui_status_bar_icon_alarm_clock"); mAlarmClockIconN = findPreference("prefs_key_system_ui_status_bar_icon_alarm_clock_n"); mNotificationIconMaximum = findPreference("prefs_key_system_ui_status_bar_notification_icon_maximum"); - + UseNewHD = findPreference("prefs_key_system_ui_status_bar_use_new_hd"); IconNewHD = findPreference("prefs_key_system_ui_status_bar_icon_new_hd"); UseNewHD.setVisible(SdkHelper.isAndroidTiramisu()); @@ -51,7 +51,7 @@ public void initPrefs() { }); mNotificationIconMaximum.setOnPreferenceChangeListener((preference, o) -> { - if ((int)o == 16) { + if ((int) o == 16) { mNotificationIconMaximum.setValue(R.string.unlimited); } return true; diff --git a/app/src/main/java/com/sevtinge/cemiuiler/ui/systemui/statusbar/MobileNetworkTypeActivity.java b/app/src/main/java/com/sevtinge/cemiuiler/ui/systemui/statusbar/MobileNetworkTypeActivity.java index 6a9bf5e5a3..7260817adf 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/ui/systemui/statusbar/MobileNetworkTypeActivity.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/ui/systemui/statusbar/MobileNetworkTypeActivity.java @@ -1,6 +1,7 @@ package com.sevtinge.cemiuiler.ui.systemui.statusbar; import androidx.fragment.app.Fragment; + import com.sevtinge.cemiuiler.R; import com.sevtinge.cemiuiler.ui.base.SubFragment; import com.sevtinge.cemiuiler.ui.systemui.base.BaseSystemUIActivity; @@ -19,4 +20,4 @@ public int getContentResId() { } } -} \ No newline at end of file +} diff --git a/app/src/main/java/com/sevtinge/cemiuiler/ui/various/LocationDataActivity.java b/app/src/main/java/com/sevtinge/cemiuiler/ui/various/LocationDataActivity.java index c79b73667f..d4c9b0338c 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/ui/various/LocationDataActivity.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/ui/various/LocationDataActivity.java @@ -101,10 +101,10 @@ public void onClick(View v) { String remarks = mRemarks.getText().toString(); if (TextUtils.isEmpty(title) || - TextUtils.isEmpty(offset) || - TextUtils.isEmpty(baseStation) || - TextUtils.isEmpty(longitudeAndLatitude) || - TextUtils.isEmpty(remarks)) { + TextUtils.isEmpty(offset) || + TextUtils.isEmpty(baseStation) || + TextUtils.isEmpty(longitudeAndLatitude) || + TextUtils.isEmpty(remarks)) { ToastHelper.makeText(this, "格式错误"); } else { @@ -113,13 +113,13 @@ public void onClick(View v) { String[] split2 = longitudeAndLatitude.split(",", 2); LocationData mData = new LocationData(title, - Double.parseDouble(split2[0]), - Double.parseDouble(split2[1]), - Integer.parseInt(offset), - Integer.parseInt(split[0]), - Integer.parseInt(split[1]), - remarks, - 1); + Double.parseDouble(split2[0]), + Double.parseDouble(split2[1]), + Integer.parseInt(offset), + Integer.parseInt(split[0]), + Integer.parseInt(split[1]), + remarks, + 1); /*mData.setTitle(title); mData.setLongitude(Double.parseDouble(split2[0])); diff --git a/app/src/main/java/com/sevtinge/cemiuiler/ui/various/VariousDialogActivity.java b/app/src/main/java/com/sevtinge/cemiuiler/ui/various/VariousDialogActivity.java index c3b3756952..c0f4ac50ba 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/ui/various/VariousDialogActivity.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/ui/various/VariousDialogActivity.java @@ -47,7 +47,7 @@ public void initPrefs() { mDialogBackgroundBlur = findPreference("prefs_key_various_dialog_bg_blur"); - int gialogGravity = Integer.parseInt(PrefsUtils.getSharedStringPrefs(getActivity(),"prefs_key_various_dialog_gravity","0")); + int gialogGravity = Integer.parseInt(PrefsUtils.getSharedStringPrefs(getActivity(), "prefs_key_various_dialog_gravity", "0")); mDialogHorizontalMargin.setVisible(gialogGravity != 0); mDialogBottomMargin.setVisible(gialogGravity == 2); diff --git a/app/src/main/java/com/sevtinge/cemiuiler/ui/various/VariousThemeActivity.java b/app/src/main/java/com/sevtinge/cemiuiler/ui/various/VariousThemeActivity.java index a00fd0f103..4df868eb42 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/ui/various/VariousThemeActivity.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/ui/various/VariousThemeActivity.java @@ -6,7 +6,6 @@ import com.sevtinge.cemiuiler.ui.base.BaseAppCompatActivity; import com.sevtinge.cemiuiler.ui.base.SubFragment; - import moralnorm.os.SystemProperties; import moralnorm.preference.PreferenceCategory; import moralnorm.preference.SwitchPreference; @@ -43,7 +42,7 @@ public void initPrefs() { } mThemeManagerCrack = findPreference("prefs_key_various_theme_crack"); - if (!getSharedPreferences().getBoolean("prefs_key_hidden_function",false)) { + if (!getSharedPreferences().getBoolean("prefs_key_hidden_function", false)) { mThemeManagerCrack.setVisible(false); } } diff --git a/app/src/main/java/com/sevtinge/cemiuiler/ui/various/fragment/VariousFragment.java b/app/src/main/java/com/sevtinge/cemiuiler/ui/various/fragment/VariousFragment.java index 232641d887..10eb5fffc3 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/ui/various/fragment/VariousFragment.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/ui/various/fragment/VariousFragment.java @@ -3,11 +3,13 @@ import android.os.Bundle; import android.util.Log; - import com.sevtinge.cemiuiler.utils.PrefsUtils; -import moralnorm.preference.*; +import moralnorm.preference.DropDownPreference; +import moralnorm.preference.PreferenceCategory; +import moralnorm.preference.PreferenceFragmentCompat; import moralnorm.preference.SeekBarPreference; +import moralnorm.preference.SwitchPreference; public class VariousFragment extends PreferenceFragmentCompat { @@ -49,7 +51,7 @@ public void onCreatePreferences(Bundle bundle, String s) { mBlurEnabledCat = findPreference("prefs_key_various_blur_enabled_cat"); mBlurCustomCat = findPreference("prefs_key_various_blur_custom"); - int gialogGravity = Integer.parseInt(PrefsUtils.getSharedStringPrefs(getActivity(),"prefs_key_various_dialog_gravity","0")); + int gialogGravity = Integer.parseInt(PrefsUtils.getSharedStringPrefs(getActivity(), "prefs_key_various_dialog_gravity", "0")); mDialogHorizontalMargin.setVisible(gialogGravity != 0); mDialogBottomMargin.setVisible(gialogGravity == 2); @@ -62,7 +64,7 @@ public void onCreatePreferences(Bundle bundle, String s) { }); - boolean bluEnabled = PrefsUtils.getSharedBoolPrefs(getActivity(),"prefs_key_various_blur_enabled",false); + boolean bluEnabled = PrefsUtils.getSharedBoolPrefs(getActivity(), "prefs_key_various_blur_enabled", false); mBlurEnabledCat.setVisible(bluEnabled); mBlurCustomCat.setVisible(bluEnabled); diff --git a/app/src/main/java/com/sevtinge/cemiuiler/utils/ALPermissionManager.java b/app/src/main/java/com/sevtinge/cemiuiler/utils/ALPermissionManager.java index b30d5ad551..42ef3f40ad 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/utils/ALPermissionManager.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/utils/ALPermissionManager.java @@ -1,7 +1,5 @@ package com.sevtinge.cemiuiler.utils; -import android.util.Log; - import java.io.DataOutputStream; public class ALPermissionManager { @@ -14,8 +12,8 @@ public static boolean RootCommand(String pkgCodePath) { Process process = null; DataOutputStream os = null; try { - String cmd="chmod 777 " + pkgCodePath; - process = Runtime.getRuntime().exec("su"); //切换到root帐号 + String cmd = "chmod 777 " + pkgCodePath; + process = Runtime.getRuntime().exec("su"); // 切换到root帐号 os = new DataOutputStream(process.getOutputStream()); os.writeBytes(cmd + "\n"); os.writeBytes("exit\n"); diff --git a/app/src/main/java/com/sevtinge/cemiuiler/utils/AppRegister.kt b/app/src/main/java/com/sevtinge/cemiuiler/utils/AppRegister.kt index 53227e9e9c..17a7153393 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/utils/AppRegister.kt +++ b/app/src/main/java/com/sevtinge/cemiuiler/utils/AppRegister.kt @@ -7,7 +7,7 @@ import de.robv.android.xposed.IXposedHookLoadPackage import de.robv.android.xposed.callbacks.XC_InitPackageResources import de.robv.android.xposed.callbacks.XC_LoadPackage -abstract class AppRegister: IXposedHookLoadPackage, IXposedHookInitPackageResources { +abstract class AppRegister : IXposedHookLoadPackage, IXposedHookInitPackageResources { abstract val packageName: String @@ -28,7 +28,10 @@ abstract class AppRegister: IXposedHookLoadPackage, IXposedHookInitPackageResour override fun handleInitPackageResources(resparam: XC_InitPackageResources.InitPackageResourcesParam) {} - protected fun autoInitResourcesHooks(resparam: XC_InitPackageResources.InitPackageResourcesParam, vararg hook: ResourcesHookRegister) { + protected fun autoInitResourcesHooks( + resparam: XC_InitPackageResources.InitPackageResourcesParam, + vararg hook: ResourcesHookRegister + ) { hook.also { }.forEach { runCatching { @@ -40,4 +43,4 @@ abstract class AppRegister: IXposedHookLoadPackage, IXposedHookInitPackageResour }.logexIfThrow("Failed to Hook [$packageName]") } } -} \ No newline at end of file +} diff --git a/app/src/main/java/com/sevtinge/cemiuiler/utils/AppUtils.kt b/app/src/main/java/com/sevtinge/cemiuiler/utils/AppUtils.kt index 49cb4f18b7..95c5cf98bd 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/utils/AppUtils.kt +++ b/app/src/main/java/com/sevtinge/cemiuiler/utils/AppUtils.kt @@ -31,17 +31,22 @@ fun isDarkMode(): Boolean = @SuppressLint("PrivateApi") @Suppress("RECEIVER_NULLABILITY_MISMATCH_BASED_ON_JAVA_ANNOTATIONS") fun getProp(mKey: String): String = - Class.forName("android.os.SystemProperties").getMethod("get", String::class.java).invoke(Class.forName("android.os.SystemProperties"), mKey) + Class.forName("android.os.SystemProperties").getMethod("get", String::class.java) + .invoke(Class.forName("android.os.SystemProperties"), mKey) .toString() @SuppressLint("PrivateApi") fun getProp(mKey: String, defaultValue: Boolean): Boolean = - Class.forName("android.os.SystemProperties").getMethod("getBoolean", String::class.java, Boolean::class.javaPrimitiveType) + Class.forName("android.os.SystemProperties") + .getMethod("getBoolean", String::class.java, Boolean::class.javaPrimitiveType) .invoke(Class.forName("android.os.SystemProperties"), mKey, defaultValue) as Boolean fun getPackageInfoCompat(packageName: String, flags: Int = 0): PackageInfo = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) { - EzXHelper.appContext.packageManager.getPackageInfo(packageName, PackageManager.PackageInfoFlags.of(flags.toLong())) + EzXHelper.appContext.packageManager.getPackageInfo( + packageName, + PackageManager.PackageInfoFlags.of(flags.toLong()) + ) } else { @Suppress("DEPRECATION") EzXHelper.appContext.packageManager.getPackageInfo(packageName, flags) @@ -49,7 +54,8 @@ fun getPackageInfoCompat(packageName: String, flags: Int = 0): PackageInfo = fun checkVersionName(): String = getPackageInfoCompat(EzXHelper.appContext.packageName).versionName -fun isAlpha(): Boolean = getPackageInfoCompat(EzXHelper.appContext.packageName).versionName.contains("ALPHA", ignoreCase = true) +fun isAlpha(): Boolean = + getPackageInfoCompat(EzXHelper.appContext.packageName).versionName.contains("ALPHA", ignoreCase = true) fun isPadDevice(): Boolean = DeviceHelper.isTablet() || DeviceHelper.isFoldDevice() @@ -122,4 +128,4 @@ fun getLocale(context: Context): Locale { Log.d("AppUtil", "getLocale: sysLang=$sysLang") Locale.forLanguageTag(sysLang) } else Locale.forLanguageTag(tag) -} \ No newline at end of file +} diff --git a/app/src/main/java/com/sevtinge/cemiuiler/utils/BlurUtils.java b/app/src/main/java/com/sevtinge/cemiuiler/utils/BlurUtils.java index 7578a8b9ce..f71c47e983 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/utils/BlurUtils.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/utils/BlurUtils.java @@ -53,10 +53,10 @@ public void setKey(Context context, String key) { String mCornerRadiusKey = key + "_corner_radius"; isBlurEnable = XposedInit.mPrefsMap.getBoolean(mBlurEnableKey); - mBlurRadius = XposedInit.mPrefsMap.getInt(mBlurRadiusKey,60); + mBlurRadius = XposedInit.mPrefsMap.getInt(mBlurRadiusKey, 60); - mColor = XposedInit.mPrefsMap.getInt(mColorKey,2113929215); - mAlpha = XposedInit.mPrefsMap.getInt(mAlphaKey,60); + mColor = XposedInit.mPrefsMap.getInt(mColorKey, 2113929215); + mAlpha = XposedInit.mPrefsMap.getInt(mAlphaKey, 60); mCornerRadius = DisplayUtils.dip2px(context, XposedInit.mPrefsMap.getInt(mCornerRadiusKey, 18)); } else { @@ -74,7 +74,7 @@ private void setOnAttachStateChangeListener(View view) { view.addOnAttachStateChangeListener(new View.OnAttachStateChangeListener() { @Override public void onViewAttachedToWindow(View v) { - mViewRootImpl = XposedHelpers.callMethod(v,"getViewRootImpl",new Object[0]); + mViewRootImpl = XposedHelpers.callMethod(v, "getViewRootImpl", new Object[0]); mBlurDrawable = createBackgroundDrawable(mViewRootImpl, isBlurEnable, ColorUtilsStatic.colorToHexARGB(mColor), mCornerRadius, mBlurRadius); v.setBackground(mBlurDrawable); } @@ -89,7 +89,7 @@ public void onViewDetachedFromWindow(View v) { private Drawable createBackgroundDrawable(Object viewRootImpl, boolean isBlurEnable, int color, int alpha, int cornerRadius, int blurRadius) { Drawable mBackgroundDrawable; if (isBlurEnable) { - mBackgroundDrawable = (Drawable) XposedHelpers.callMethod(viewRootImpl, "createBackgroundBlurDrawable",new Object[0]); + mBackgroundDrawable = (Drawable) XposedHelpers.callMethod(viewRootImpl, "createBackgroundBlurDrawable", new Object[0]); setColor(mBackgroundDrawable, color, alpha); setCornerRadius(mBackgroundDrawable, cornerRadius); setBlurRadius(mBackgroundDrawable, blurRadius); @@ -102,7 +102,7 @@ private Drawable createBackgroundDrawable(Object viewRootImpl, boolean isBlurEna private Drawable createBackgroundDrawable(Object viewRootImpl, boolean isBlurEnable, String color, int cornerRadius, int blurRadius) { Drawable mBackgroundDrawable; if (isBlurEnable) { - mBackgroundDrawable = (Drawable) XposedHelpers.callMethod(viewRootImpl, "createBackgroundBlurDrawable",new Object[0]); + mBackgroundDrawable = (Drawable) XposedHelpers.callMethod(viewRootImpl, "createBackgroundBlurDrawable", new Object[0]); setColor(mBackgroundDrawable, color); setCornerRadius(mBackgroundDrawable, cornerRadius); setBlurRadius(mBackgroundDrawable, blurRadius); @@ -137,23 +137,23 @@ public void setColor(Drawable drawable, int color, int alpha) { int mColorRed = (color & 0x00ff0000) >> 16; int mColorGreen = (color & 0x0000ff00) >> 8; int mColorBlue = (color & 0x000000ff); - XposedHelpers.callMethod(drawable,"setColor", Color.argb(alpha, mColorRed, mColorGreen, mColorBlue)); + XposedHelpers.callMethod(drawable, "setColor", Color.argb(alpha, mColorRed, mColorGreen, mColorBlue)); } public void setColor(Drawable drawable, int color) { - XposedHelpers.callMethod(drawable,"setColor", Color.parseColor(String.valueOf(color))); + XposedHelpers.callMethod(drawable, "setColor", Color.parseColor(String.valueOf(color))); } public void setColor(Drawable drawable, String color) { - XposedHelpers.callMethod(drawable,"setColor", Color.parseColor(color)); + XposedHelpers.callMethod(drawable, "setColor", Color.parseColor(color)); } public void setCornerRadius(Drawable drawable, int cornerRadius) { - XposedHelpers.callMethod(drawable,"setCornerRadius",new Object[]{cornerRadius}); + XposedHelpers.callMethod(drawable, "setCornerRadius", new Object[]{cornerRadius}); } public void setBlurRadius(Drawable drawable, int blurRadius) { - XposedHelpers.callMethod(drawable,"setBlurRadius",new Object[]{blurRadius}); + XposedHelpers.callMethod(drawable, "setBlurRadius", new Object[]{blurRadius}); } diff --git a/app/src/main/java/com/sevtinge/cemiuiler/utils/ColorUtils.kt b/app/src/main/java/com/sevtinge/cemiuiler/utils/ColorUtils.kt index 482e9899e4..66a64c43df 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/utils/ColorUtils.kt +++ b/app/src/main/java/com/sevtinge/cemiuiler/utils/ColorUtils.kt @@ -57,7 +57,8 @@ object ColorUtils { } fun addAlphaForColor(color: Int, alpha: Int): Int { - return Color.valueOf(Color.red(color) / 255f,Color.green(color)/ 255f,Color.blue(color)/ 255f,alpha/ 255f).toArgb() + return Color.valueOf(Color.red(color) / 255f, Color.green(color) / 255f, Color.blue(color) / 255f, alpha / 255f) + .toArgb() } -} \ No newline at end of file +} diff --git a/app/src/main/java/com/sevtinge/cemiuiler/utils/ColorUtilsStatic.java b/app/src/main/java/com/sevtinge/cemiuiler/utils/ColorUtilsStatic.java index 49092946f7..b5d3b4dce5 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/utils/ColorUtilsStatic.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/utils/ColorUtilsStatic.java @@ -7,35 +7,33 @@ public class ColorUtilsStatic { /** - * @color: 参数 - * 类型:int - * 例如:-1272178 - * * @return 字符串 - * */ + * @color: 参数 + * 类型:int + * 例如:-1272178 + */ public static String colorToRGBA(int color) { int alpha = color >>> 24; - int r = ( color & 0xff0000 ) >> 16; - int g = ( color & 0xff00 ) >> 8; + int r = (color & 0xff0000) >> 16; + int g = (color & 0xff00) >> 8; int b = color & 0xff; return alpha + ", " + r + ", " + g + ", " + b; } /** - * @red 红色数值 - * @green 绿色数值 - * @blue 蓝色色数值 - * * @return 字符串 - * */ - public static String rgbToHex(int red, int green, int blue){ + * @red 红色数值 + * @green 绿色数值 + * @blue 蓝色色数值 + */ + public static String rgbToHex(int red, int green, int blue) { String hr = Integer.toHexString(red); String hg = Integer.toHexString(green); String hb = Integer.toHexString(blue); - return "#"+hr + hg + hb; + return "#" + hr + hg + hb; } /** diff --git a/app/src/main/java/com/sevtinge/cemiuiler/utils/DialogHelper.java b/app/src/main/java/com/sevtinge/cemiuiler/utils/DialogHelper.java index 33d61eaca8..c6ef4171e3 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/utils/DialogHelper.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/utils/DialogHelper.java @@ -13,28 +13,28 @@ public static void showDialog(Activity activity, String title, String message) { public static void showDialog(Activity activity, String title, String message, DialogInterface.OnClickListener onClickListener) { new AlertDialog.Builder(activity) - .setTitle(title) - .setMessage(message) - .setPositiveButton(android.R.string.ok, onClickListener) - .setNegativeButton(android.R.string.cancel, (dialog, which) -> dialog.dismiss()) - .show(); + .setTitle(title) + .setMessage(message) + .setPositiveButton(android.R.string.ok, onClickListener) + .setNegativeButton(android.R.string.cancel, (dialog, which) -> dialog.dismiss()) + .show(); } public static void showDialog(Activity activity, int title, int message, DialogInterface.OnClickListener onClickListener) { new AlertDialog.Builder(activity) - .setTitle(title) - .setMessage(message) - .setPositiveButton(android.R.string.ok, onClickListener) - .setNegativeButton(android.R.string.cancel, (dialog, which) -> dialog.dismiss()) - .show(); + .setTitle(title) + .setMessage(message) + .setPositiveButton(android.R.string.ok, onClickListener) + .setNegativeButton(android.R.string.cancel, (dialog, which) -> dialog.dismiss()) + .show(); } public static void showPositiveButtonDialog(Activity activity, String title, String message, DialogInterface.OnClickListener onClickListener) { new AlertDialog.Builder(activity) - .setTitle(title) - .setMessage(message) - .setPositiveButton(android.R.string.ok, onClickListener) - .show(); + .setTitle(title) + .setMessage(message) + .setPositiveButton(android.R.string.ok, onClickListener) + .show(); } } diff --git a/app/src/main/java/com/sevtinge/cemiuiler/utils/DisplayUtils.java b/app/src/main/java/com/sevtinge/cemiuiler/utils/DisplayUtils.java index 9534cca935..9c8bde261c 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/utils/DisplayUtils.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/utils/DisplayUtils.java @@ -16,22 +16,23 @@ public class DisplayUtils { public static void getAndroidScreenProperty(Context context) { mDisplayMetrics = new DisplayMetrics(); - ((WindowManager)context.getSystemService(Context.WINDOW_SERVICE)).getDefaultDisplay().getMetrics(mDisplayMetrics); + ((WindowManager) context.getSystemService(Context.WINDOW_SERVICE)).getDefaultDisplay().getMetrics(mDisplayMetrics); mWidthPixels = mDisplayMetrics.widthPixels; mHeightPixels = mDisplayMetrics.heightPixels; mDensity = mDisplayMetrics.density; mDensityDpi = mDisplayMetrics.densityDpi; float f = mDensity; - mWidthDps = (int)((float)mWidthPixels / f); - mHeightDps = (int)((float)mHeightPixels / f); + mWidthDps = (int) ((float) mWidthPixels / f); + mHeightDps = (int) ((float) mHeightPixels / f); } - public static int dip2px(Context context, float dipValue){ + public static int dip2px(Context context, float dipValue) { final float scale = context.getResources().getDisplayMetrics().density; - return (int)(dipValue * scale + 0.5f); + return (int) (dipValue * scale + 0.5f); } - public static int px2dip(Context context, float pxValue){ + + public static int px2dip(Context context, float pxValue) { final float scale = context.getResources().getDisplayMetrics().density; - return (int)(pxValue / scale + 0.5f); + return (int) (pxValue / scale + 0.5f); } } diff --git a/app/src/main/java/com/sevtinge/cemiuiler/utils/Helpers.java b/app/src/main/java/com/sevtinge/cemiuiler/utils/Helpers.java index 0374226fb7..53546ceabb 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/utils/Helpers.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/utils/Helpers.java @@ -23,13 +23,12 @@ import android.util.Log; import android.util.LruCache; import android.widget.TextView; -import com.sevtinge.cemiuiler.BuildConfig; +import com.sevtinge.cemiuiler.BuildConfig; import com.sevtinge.cemiuiler.R; - import com.sevtinge.cemiuiler.module.base.BaseHook; import com.sevtinge.cemiuiler.provider.SharedPrefsProvider; -import de.robv.android.xposed.callbacks.XC_LoadPackage; + import org.xmlpull.v1.XmlPullParser; import java.io.File; @@ -43,6 +42,7 @@ import de.robv.android.xposed.XC_MethodHook; import de.robv.android.xposed.XposedBridge; import de.robv.android.xposed.XposedHelpers; +import de.robv.android.xposed.callbacks.XC_LoadPackage; import moralnorm.internal.utils.ReflectUtils; import moralnorm.preference.PreferenceCategory; import moralnorm.preference.PreferenceScreen; @@ -204,7 +204,7 @@ private static void parsePrefXml(Context context, int xmlResId) { modData.sub = lastPrefSub; modData.order = order; allModsList.add(modData); - //Log.e("miuizer", modData.key + " = " + modData.order); + // Log.e("miuizer", modData.key + " = " + modData.order); } } order++; @@ -220,7 +220,7 @@ private static void parsePrefXml(Context context, int xmlResId) { public static Object proxySystemProperties(String method, String prop, int val, ClassLoader classLoader) { return XposedHelpers.callStaticMethod(XposedHelpers.findClassIfExists("android.os.SystemProperties", classLoader), - method, prop, val); + method, prop, val); } @@ -576,11 +576,20 @@ else if (prefType == PrefType.Boolean) onChange(prefName, prefDefValueBool); } - public void onChange(Uri uri) {} - public void onChange(String name) {} - public void onChange(String name, String defValue) {} - public void onChange(String name, int defValue) {} - public void onChange(String name, boolean defValue) {} + public void onChange(Uri uri) { + } + + public void onChange(String name) { + } + + public void onChange(String name, String defValue) { + } + + public void onChange(String name, int defValue) { + } + + public void onChange(String name, boolean defValue) { + } } @SuppressWarnings("unchecked") @@ -756,12 +765,15 @@ public static int getPackageVersionCode(XC_LoadPackage.LoadPackageParam lpparam) public static int constrain(int amount, int low, int high) { return amount < low ? low : (Math.min(amount, high)); } + public static float constrain(float amount, float low, float high) { return amount < low ? low : (Math.min(amount, high)); } + public static float lerp(float start, float stop, float amount) { return start + (stop - start) * amount; } + public static float lerp(int start, int stop, float amount) { return lerp((float) start, (float) stop, amount); } @@ -777,14 +789,17 @@ public static float saturate(float value) { public static float lerpInvSat(float a, float b, float value) { return saturate(lerpInv(a, b, value)); } + public static float norm(float start, float stop, float value) { return (value - start) / (stop - start); } + private static float sq(float f) { return f * f; } + public static float exp(float f) { - return (float)Math.exp(f); + return (float) Math.exp(f); } public static float convertGammaToLinearFloat(float i, int max, float f, float f2) { diff --git a/app/src/main/java/com/sevtinge/cemiuiler/utils/KotlinXposedHelper.kt b/app/src/main/java/com/sevtinge/cemiuiler/utils/KotlinXposedHelper.kt index 943a097458..746b5525c8 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/utils/KotlinXposedHelper.kt +++ b/app/src/main/java/com/sevtinge/cemiuiler/utils/KotlinXposedHelper.kt @@ -13,14 +13,14 @@ import de.robv.android.xposed.XC_MethodReplacement import de.robv.android.xposed.XposedBridge.* import de.robv.android.xposed.XposedHelpers.* import de.robv.android.xposed.callbacks.XC_LayoutInflated -import java.lang.reflect.Field -import java.lang.reflect.Member -import java.lang.reflect.Modifier -import java.util.Enumeration import java.io.BufferedReader import java.io.DataOutputStream import java.io.IOException import java.io.InputStreamReader +import java.lang.reflect.Field +import java.lang.reflect.Member +import java.lang.reflect.Modifier +import java.util.Enumeration typealias MethodHookParam = MethodHookParam typealias Replacer = (MethodHookParam) -> Any? @@ -506,4 +506,4 @@ val Member.isPublic: Boolean val Member.isNotStatic: Boolean inline get() = !isStatic val Class<*>.isAbstract: Boolean - inline get() = !isPrimitive && Modifier.isAbstract(modifiers) \ No newline at end of file + inline get() = !isPrimitive && Modifier.isAbstract(modifiers) diff --git a/app/src/main/java/com/sevtinge/cemiuiler/utils/LogUtils.java b/app/src/main/java/com/sevtinge/cemiuiler/utils/LogUtils.java index b2211009c5..a336586f4e 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/utils/LogUtils.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/utils/LogUtils.java @@ -2,26 +2,27 @@ import android.util.Log; -import de.robv.android.xposed.XposedBridge; import com.sevtinge.cemiuiler.BuildConfig; +import de.robv.android.xposed.XposedBridge; + public class LogUtils { public static final String TAG = "Cemiuiler"; public static final String mStartWith = "Cemiuiler: "; public static boolean isDebugVersion = BuildConfig.DEBUG; - public static void log (String message) { + public static void log(String message) { String mLog = mStartWith + message; XposedBridge.log(mLog); } - public static void log (Throwable tr) { - String mErro = mStartWith + "Erro: [" + tr.getMessage() + "]"; + public static void log(Throwable tr) { + String mErro = mStartWith + "Erro: [" + tr.getMessage() + "]"; XposedBridge.log(mErro); } - public static void log (String message, Throwable tr) { + public static void log(String message, Throwable tr) { log(message); log(tr); } diff --git a/app/src/main/java/com/sevtinge/cemiuiler/utils/LogcatHelper.java b/app/src/main/java/com/sevtinge/cemiuiler/utils/LogcatHelper.java index 06d59d25ff..77f8a324ce 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/utils/LogcatHelper.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/utils/LogcatHelper.java @@ -21,10 +21,8 @@ public class LogcatHelper { private final int mPId; /** - * * 初始化目录 - * - * */ + */ public void init(Context context) { if (Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED)) { // 优先保存到SD卡中 @@ -116,7 +114,7 @@ public void run() { } if (out != null && line.contains(mPID)) { out.write((getDateEN() + " " + line + "\n") - .getBytes()); + .getBytes()); } } @@ -162,4 +160,4 @@ public static String getDateEN() { return format.format(new Date(System.currentTimeMillis())); } -} \ No newline at end of file +} diff --git a/app/src/main/java/com/sevtinge/cemiuiler/utils/ModData.java b/app/src/main/java/com/sevtinge/cemiuiler/utils/ModData.java index 01f630b28d..a6245d0e64 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/utils/ModData.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/utils/ModData.java @@ -2,16 +2,16 @@ public class ModData { - public enum ModCat { - prefs_key_home, - prefs_key_security_center, - prefs_key_various - } + public enum ModCat { + prefs_key_home, + prefs_key_security_center, + prefs_key_various + } - public String title; - public String breadcrumbs; - public String key; - public ModCat cat; - public String sub; - public int order; + public String title; + public String breadcrumbs; + public String key; + public ModCat cat; + public String sub; + public int order; } diff --git a/app/src/main/java/com/sevtinge/cemiuiler/utils/PrefsMap.java b/app/src/main/java/com/sevtinge/cemiuiler/utils/PrefsMap.java index 3f41089163..a00813a7f3 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/utils/PrefsMap.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/utils/PrefsMap.java @@ -6,34 +6,34 @@ public class PrefsMap extends HashMap { - public Object getObject(String key, Object defValue) { - return get(key) == null ? defValue : get(key); - } - - public int getInt(String key, int defValue) { - key = "prefs_key_" + key; - return get(key) == null ? defValue : (Integer)get(key); - } - - public String getString(String key, String defValue) { - key = "prefs_key_" + key; - return get(key) == null ? defValue : (String)get(key); - } - - public int getStringAsInt(String key, int defValue) { - key = "prefs_key_" + key; - return get(key) == null ? defValue : Integer.parseInt((String)get(key)); - } - - @SuppressWarnings("unchecked") - public Set getStringSet(String key) { - key = "prefs_key_" + key; - return get(key) == null ? new LinkedHashSet() : (Set)get(key); - } - - public boolean getBoolean(String key) { - key = "prefs_key_" + key; - return get(key) == null ? false : (Boolean)get(key); - } + public Object getObject(String key, Object defValue) { + return get(key) == null ? defValue : get(key); + } + + public int getInt(String key, int defValue) { + key = "prefs_key_" + key; + return get(key) == null ? defValue : (Integer) get(key); + } + + public String getString(String key, String defValue) { + key = "prefs_key_" + key; + return get(key) == null ? defValue : (String) get(key); + } + + public int getStringAsInt(String key, int defValue) { + key = "prefs_key_" + key; + return get(key) == null ? defValue : Integer.parseInt((String) get(key)); + } + + @SuppressWarnings("unchecked") + public Set getStringSet(String key) { + key = "prefs_key_" + key; + return get(key) == null ? new LinkedHashSet() : (Set) get(key); + } + + public boolean getBoolean(String key) { + key = "prefs_key_" + key; + return get(key) == null ? false : (Boolean) get(key); + } } diff --git a/app/src/main/java/com/sevtinge/cemiuiler/utils/PrefsUtils.java b/app/src/main/java/com/sevtinge/cemiuiler/utils/PrefsUtils.java index ae4ff9096e..1c879ebadb 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/utils/PrefsUtils.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/utils/PrefsUtils.java @@ -47,25 +47,27 @@ public static String getSharedPrefsPath() { if (mPrefsPathCurrent == null) try { Field mFile = mSharedPreferences.getClass().getDeclaredField("mFile"); mFile.setAccessible(true); - mPrefsPathCurrent = ((File)mFile.get(mSharedPreferences)).getParentFile().getAbsolutePath(); + mPrefsPathCurrent = ((File) mFile.get(mSharedPreferences)).getParentFile().getAbsolutePath(); return mPrefsPathCurrent; } catch (Throwable t) { System.out.print("Test" + t); return mPrefsPath; - } else return mPrefsPathCurrent; + } + else return mPrefsPathCurrent; } public static String getSharedPrefsFile() { if (mPrefsFileCurrent == null) try { Field fFile = mSharedPreferences.getClass().getDeclaredField("mFile"); fFile.setAccessible(true); - mPrefsFileCurrent = ((File)fFile.get(mSharedPreferences)).getAbsolutePath(); + mPrefsFileCurrent = ((File) fFile.get(mSharedPreferences)).getAbsolutePath(); System.out.println("Test: mPrefsFileCurrent"); return mPrefsFileCurrent; } catch (Throwable t) { System.out.println("Test: mPrefsFile" + t); return mPrefsFile; - } else + } + else System.out.println("Test: mPrefsFileCurrent2"); return mPrefsFileCurrent; } @@ -94,7 +96,7 @@ public static String getSharedStringPrefs(Context context, String name, String d } if (XposedInit.mPrefsMap.containsKey(name)) - return (String)XposedInit.mPrefsMap.getObject(name, defValue); + return (String) XposedInit.mPrefsMap.getObject(name, defValue); else return defValue; } @@ -114,7 +116,7 @@ public static Set getSharedStringSetPrefs(Context context, String name) LinkedHashSet empty = new LinkedHashSet(); if (XposedInit.mPrefsMap.containsKey(name)) - return (Set)XposedInit.mPrefsMap.getObject(name, empty); + return (Set) XposedInit.mPrefsMap.getObject(name, empty); else return empty; } @@ -134,7 +136,7 @@ public static int getSharedIntPrefs(Context context, String name, int defValue) } if (XposedInit.mPrefsMap.containsKey(name)) - return (int)XposedInit.mPrefsMap.getObject(name, defValue); + return (int) XposedInit.mPrefsMap.getObject(name, defValue); else return defValue; } @@ -153,7 +155,7 @@ public static boolean getSharedBoolPrefs(Context context, String name, boolean d } if (XposedInit.mPrefsMap.containsKey(name)) - return (boolean)XposedInit.mPrefsMap.getObject(name, false); + return (boolean) XposedInit.mPrefsMap.getObject(name, false); else return defValue; } @@ -184,7 +186,6 @@ public static Uri anyPrefsToUri() { } - public static class SharedPrefsObserver extends ContentObserver { enum PrefType { @@ -231,15 +232,15 @@ public SharedPrefsObserver(Context context, Handler handler, String name, int de registerObserver(); } - @SuppressLint("SuspiciousIndentation") + @SuppressLint("SuspiciousIndentation") public SharedPrefsObserver(Context context, Handler handler, String name, boolean defValue) { super(handler); ctx = context; - prefType = PrefType.Boolean; + prefType = PrefType.Boolean; mPrefsName = name; mPrefsDefValueBool = defValue; - registerObserver(); - } + registerObserver(); + } void registerObserver() { Uri uri = null; @@ -249,7 +250,7 @@ else if (prefType == PrefType.StringSet) uri = stringSetPrefsToUri(mPrefsName); else if (prefType == PrefType.Integer) uri = intPrefsToUri(mPrefsName, mPrefsDefValueInt); - else if (prefType == PrefType.Boolean) + else if (prefType == PrefType.Boolean) uri = boolPrefsToUri(mPrefsName, mPrefsDefValueBool); else if (prefType == PrefType.Any) uri = anyPrefsToUri(); @@ -274,13 +275,22 @@ else if (prefType == PrefType.StringSet) else if (prefType == PrefType.Integer) onChange(mPrefsName, mPrefsDefValueInt); else if (prefType == PrefType.Boolean) - onChange(mPrefsName, mPrefsDefValueBool); + onChange(mPrefsName, mPrefsDefValueBool); + } + + public void onChange(Uri uri) { + } + + public void onChange(String name) { + } + + public void onChange(String name, String defValue) { + } + + public void onChange(String name, int defValue) { } - public void onChange(Uri uri) {} - public void onChange(String name) {} - public void onChange(String name, String defValue) {} - public void onChange(String name, int defValue) {} - public void onChange(String name, boolean defValue) {} + public void onChange(String name, boolean defValue) { + } } } diff --git a/app/src/main/java/com/sevtinge/cemiuiler/utils/SdkHelper.java b/app/src/main/java/com/sevtinge/cemiuiler/utils/SdkHelper.java index 0170a756ab..812be42d59 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/utils/SdkHelper.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/utils/SdkHelper.java @@ -8,30 +8,30 @@ public class SdkHelper { public static final boolean ATLEAST_S; public static final boolean ATLEAST_T; -/* public static final boolean ATLEAST_U;*/ + /* public static final boolean ATLEAST_U;*/ public static final boolean IS_MIUI; public static final boolean IS_MIUI_13; public static final boolean IS_MIUI_14; public static final int PROP_MIUI_VERSION_CODE; - public static boolean isAndroidMoreVersion(int version){ + public static boolean isAndroidMoreVersion(int version) { return (Build.VERSION.SDK_INT >= version); } - - public static boolean isAndroidR(){ + + public static boolean isAndroidR() { return (Build.VERSION.SDK_INT == Build.VERSION_CODES.R); } - public static boolean isAndroidS(){ + public static boolean isAndroidS() { return (Build.VERSION.SDK_INT == Build.VERSION_CODES.S); } - public static boolean isAndroidSv2(){ + public static boolean isAndroidSv2() { return (Build.VERSION.SDK_INT == Build.VERSION_CODES.S_V2); } - public static boolean isAndroidTiramisu(){ + public static boolean isAndroidTiramisu() { return (Build.VERSION.SDK_INT == Build.VERSION_CODES.TIRAMISU); } @@ -43,7 +43,7 @@ public static boolean isAndroidTiramisu(){ ATLEAST_R = isAndroidR(); ATLEAST_S = isAndroidS(); ATLEAST_T = isAndroidTiramisu(); - /* ATLEAST_U = isAndroidU();*/ + /* ATLEAST_U = isAndroidU();*/ IS_MIUI = moralnorm.os.Build.IS_MIUI; PROP_MIUI_VERSION_CODE = IS_MIUI ? Integer.parseInt(moralnorm.os.Build.getMiuiVersionCode()) : 0; diff --git a/app/src/main/java/com/sevtinge/cemiuiler/utils/ShakeManager.java b/app/src/main/java/com/sevtinge/cemiuiler/utils/ShakeManager.java index c1a87c4db4..870ef1f510 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/utils/ShakeManager.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/utils/ShakeManager.java @@ -40,7 +40,7 @@ public void reset() { @Override public void onAccuracyChanged(Sensor sensor, int accuracy) { - //Don't care... + // Don't care... } @Override @@ -78,8 +78,8 @@ private boolean isAccelerationChanged() { float shakeThresholdY = 4f; float shakeThresholdZ = 8f; return (deltaX > shakeThresholdX && deltaY > shakeThresholdY) - || (deltaX > shakeThresholdX && deltaZ > shakeThresholdZ) - || (deltaY > shakeThresholdY && deltaZ > shakeThresholdZ); + || (deltaX > shakeThresholdX && deltaZ > shakeThresholdZ) + || (deltaY > shakeThresholdY && deltaZ > shakeThresholdZ); } private void executeShakeActionDelayed() { diff --git a/app/src/main/java/com/sevtinge/cemiuiler/utils/ShellUtils.java b/app/src/main/java/com/sevtinge/cemiuiler/utils/ShellUtils.java index 67a54b4772..c886bb5f40 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/utils/ShellUtils.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/utils/ShellUtils.java @@ -8,9 +8,9 @@ public class ShellUtils { - public static final String COMMAND_SU = "su"; - public static final String COMMAND_SH = "sh"; - public static final String COMMAND_EXIT = "exit\n"; + public static final String COMMAND_SU = "su"; + public static final String COMMAND_SH = "sh"; + public static final String COMMAND_EXIT = "exit\n"; public static final String COMMAND_LINE_END = "\n"; private ShellUtils() { @@ -30,31 +30,31 @@ public static boolean checkRootPermission() { * execute shell command, default return result msg * * @param command command - * @param isRoot whether need to run with root + * @param isRoot whether need to run with root * @return * @see ShellUtils#execCommand(String[], boolean, boolean) */ public static CommandResult execCommand(String command, boolean isRoot) { - return execCommand(new String[] {command}, isRoot, true); + return execCommand(new String[]{command}, isRoot, true); } /** * execute shell commands, default return result msg * * @param commands command activity_wifi - * @param isRoot whether need to run with root + * @param isRoot whether need to run with root * @return * @see ShellUtils#execCommand(String[], boolean, boolean) */ public static CommandResult execCommand(List commands, boolean isRoot) { - return execCommand(commands == null ? null : commands.toArray(new String[] {}), isRoot, true); + return execCommand(commands == null ? null : commands.toArray(new String[]{}), isRoot, true); } /** * execute shell commands, default return result msg * * @param commands command array - * @param isRoot whether need to run with root + * @param isRoot whether need to run with root * @return * @see ShellUtils#execCommand(String[], boolean, boolean) */ @@ -65,40 +65,40 @@ public static CommandResult execCommand(String[] commands, boolean isRoot) { /** * execute shell command * - * @param command command - * @param isRoot whether need to run with root + * @param command command + * @param isRoot whether need to run with root * @param isNeedResultMsg whether need result msg * @return * @see ShellUtils#execCommand(String[], boolean, boolean) */ public static CommandResult execCommand(String command, boolean isRoot, boolean isNeedResultMsg) { - return execCommand(new String[] {command}, isRoot, isNeedResultMsg); + return execCommand(new String[]{command}, isRoot, isNeedResultMsg); } /** * execute shell commands * - * @param commands command activity_wifi - * @param isRoot whether need to run with root + * @param commands command activity_wifi + * @param isRoot whether need to run with root * @param isNeedResultMsg whether need result msg * @return * @see ShellUtils#execCommand(String[], boolean, boolean) */ public static CommandResult execCommand(List commands, boolean isRoot, boolean isNeedResultMsg) { - return execCommand(commands == null ? null : commands.toArray(new String[] {}), isRoot, isNeedResultMsg); + return execCommand(commands == null ? null : commands.toArray(new String[]{}), isRoot, isNeedResultMsg); } /** * execute shell commands * - * @param commands command array - * @param isRoot whether need to run with root + * @param commands command array + * @param isRoot whether need to run with root * @param isNeedResultMsg whether need result msg * @return
    - *
  • if isNeedResultMsg is false, {@link CommandResult#successMsg} is null and - * {@link CommandResult#errorMsg} is null.
  • - *
  • if {@link CommandResult#result} is -1, there maybe some excepiton.
  • - *
+ *
  • if isNeedResultMsg is false, {@link CommandResult#successMsg} is null and + * {@link CommandResult#errorMsg} is null.
  • + *
  • if {@link CommandResult#result} is -1, there maybe some excepiton.
  • + * */ public static CommandResult execCommand(String[] commands, boolean isRoot, boolean isNeedResultMsg) { int result = -1; @@ -166,7 +166,7 @@ public static CommandResult execCommand(String[] commands, boolean isRoot, boole } } return new CommandResult(result, successMsg == null ? null : successMsg.toString(), errorMsg == null ? null - : errorMsg.toString()); + : errorMsg.toString()); } /** @@ -182,11 +182,17 @@ public static CommandResult execCommand(String[] commands, boolean isRoot, boole */ public static class CommandResult { - /** result of command **/ - public int result; - /** success message of command result **/ + /** + * result of command + **/ + public int result; + /** + * success message of command result + **/ public String successMsg; - /** error message of command result **/ + /** + * error message of command result + **/ public String errorMsg; public CommandResult(int result) { @@ -199,4 +205,4 @@ public CommandResult(int result, String successMsg, String errorMsg) { this.errorMsg = errorMsg; } } -} \ No newline at end of file +} diff --git a/app/src/main/java/com/sevtinge/cemiuiler/utils/SystemProperties.kt b/app/src/main/java/com/sevtinge/cemiuiler/utils/SystemProperties.kt index c05654988a..e35a7908dd 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/utils/SystemProperties.kt +++ b/app/src/main/java/com/sevtinge/cemiuiler/utils/SystemProperties.kt @@ -10,11 +10,11 @@ object SystemProperties { try { val cl = context.classLoader val systemProperties = cl.loadClass("android.os.SystemProperties") - //参数类型 + // 参数类型 val paramTypes: Array?> = arrayOfNulls(1) paramTypes[0] = String::class.java val get = systemProperties.getMethod("get", *paramTypes) - //参数 + // 参数 val params = arrayOfNulls(1) params[0] = key ret = get.invoke(systemProperties, *params) as String @@ -26,4 +26,4 @@ object SystemProperties { return ret } -} \ No newline at end of file +} diff --git a/app/src/main/java/com/sevtinge/cemiuiler/utils/api/VoyagerApis.kt b/app/src/main/java/com/sevtinge/cemiuiler/utils/api/VoyagerApis.kt index b2eeb29e14..582d9b5bfc 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/utils/api/VoyagerApis.kt +++ b/app/src/main/java/com/sevtinge/cemiuiler/utils/api/VoyagerApis.kt @@ -207,9 +207,9 @@ fun hookPluginClassLoader(onGetClassLoader: (appInfo: ApplicationInfo, classLoad val classLoaderClass = loadClass("com.android.systemui.shared.plugins.PluginInstance\$Factory") classLoaderClass.methodFinder().first { name == "getClassLoader" - && parameterCount == 2 - && parameterTypes[0] == ApplicationInfo::class.java - && parameterTypes[1] == ClassLoader::class.java + && parameterCount == 2 + && parameterTypes[0] == ApplicationInfo::class.java + && parameterTypes[1] == ClassLoader::class.java }.createHook { after { getClassLoader -> val appInfo = getClassLoader.args[0] as ApplicationInfo @@ -220,4 +220,4 @@ fun hookPluginClassLoader(onGetClassLoader: (appInfo: ApplicationInfo, classLoad } } } -} \ No newline at end of file +} diff --git a/app/src/main/java/com/sevtinge/cemiuiler/view/BatteryIndicatorView.java b/app/src/main/java/com/sevtinge/cemiuiler/view/BatteryIndicatorView.java index 0a7d1bbd99..2bdd22370e 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/view/BatteryIndicatorView.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/view/BatteryIndicatorView.java @@ -95,7 +95,7 @@ public void init(Object statusBar) { public void onChange(Uri uri) { try { String key = uri.getPathSegments().get(2); - if (!mTesting ) { + if (!mTesting) { updateParameters(); update(); } @@ -154,7 +154,7 @@ public void onKeyguardStateChanged(boolean showing) { } public void onDarkModeChanged(float intensity, int tintColor) { - //if (intensity != 0.0f && intensity != 1.0f) return; + // if (intensity != 0.0f && intensity != 1.0f) return; if (mTintColor == tintColor) return; mTintColor = tintColor; update(); @@ -181,7 +181,7 @@ public void onPowerSaveChanged(boolean isPowerSave) { } public void onExtremePowerSaveChanged(boolean isExtremePowerSave) { - if (this.mIsExtremePowerSave == isExtremePowerSave ) return; + if (this.mIsExtremePowerSave == isExtremePowerSave) return; this.mIsExtremePowerSave = isExtremePowerSave; update(); } @@ -228,12 +228,15 @@ protected void updateParameters() { mTransparency = PrefsUtils.getSharedIntPrefs(getContext(), "prefs_key_system_ui_status_bar_battery_indicator_alpha", 0); mPadding = PrefsUtils.getSharedIntPrefs(getContext(), "prefs_key_system_ui_status_bar_battery_indicator_padding", 0); mVisibility = PrefsUtils.getSharedBoolPrefs(getContext(), "prefs_key_system_ui_status_bar_battery_indicator_enable", false) ? View.VISIBLE : View.GONE; - FrameLayout.LayoutParams lp = (FrameLayout.LayoutParams)getLayoutParams(); + FrameLayout.LayoutParams lp = (FrameLayout.LayoutParams) getLayoutParams(); lp.width = ViewGroup.LayoutParams.MATCH_PARENT; lp.height = ViewGroup.LayoutParams.WRAP_CONTENT; lp.gravity = mBottom ? Gravity.BOTTOM : Gravity.TOP; setLayoutParams(lp); - try { this.setImageAlpha(255 - Math.round(255 * mTransparency / 100f)); } catch (Throwable ignore) {} + try { + this.setImageAlpha(255 - Math.round(255 * mTransparency / 100f)); + } catch (Throwable ignore) { + } this.setVisibility(mVisibility); this.setScaleType(mCentered ? ScaleType.CENTER : ScaleType.MATRIX); Matrix matrix = new Matrix(); @@ -254,7 +257,7 @@ else if (!this.mTesting && (this.mIsPowerSave || this.mIsExtremePowerSave)) else if (level <= this.mLowLevel) color = this.mLowColor; - ShapeDrawable shape = (ShapeDrawable)getDrawable(); + ShapeDrawable shape = (ShapeDrawable) getDrawable(); shape.setShaderFactory(null); Paint paint = shape.getPaint(); paint.setShader(null); @@ -278,17 +281,17 @@ else if (level <= this.mLowLevel) int mDisplayPadding = Math.round(mPadding / 100f * this.mDisplayWidth); if (mColorMode == ColorMode.GRADUAL) { - color = level <= this.mLowLevel || (!this.mTesting && (this.mIsBeingCharged || this.mIsPowerSave || this.mIsExtremePowerSave)) ? color : (int)new ArgbEvaluator().evaluate(1f - (level - this.mLowLevel) / (100f - this.mLowLevel), color, mLowColor); + color = level <= this.mLowLevel || (!this.mTesting && (this.mIsBeingCharged || this.mIsPowerSave || this.mIsExtremePowerSave)) ? color : (int) new ArgbEvaluator().evaluate(1f - (level - this.mLowLevel) / (100f - this.mLowLevel), color, mLowColor); } else if (mColorMode == ColorMode.RAINBOW) { int steps = 15; - float jump = 300f / (float)steps; + float jump = 300f / (float) steps; float[] pos = new float[steps]; int[] rainbow = new int[steps]; for (int i = 0; i < steps; i++) { - pos[i] = i / (float)(steps - 1); + pos[i] = i / (float) (steps - 1); float c = (mCentered ? 240 : 0) + jump * i; if (c > 360) c -= 360; - rainbow[i] = Color.HSVToColor(255, new float[]{ c, 1.0f, 1.0f}); + rainbow[i] = Color.HSVToColor(255, new float[]{c, 1.0f, 1.0f}); } shape.setShaderFactory(new ShapeDrawable.ShaderFactory() { @Override @@ -301,7 +304,7 @@ public Shader resize(int width, int height) { }); } paint.setColor(color); - shape.setShape(mRounded ? new RoundRectShape(new float[] { mHeight, mHeight, mHeight, mHeight, mHeight, mHeight, mHeight, mHeight }, null, null) : new RectShape()); + shape.setShape(mRounded ? new RoundRectShape(new float[]{mHeight, mHeight, mHeight, mHeight, mHeight, mHeight, mHeight, mHeight}, null, null) : new RectShape()); int mWidth = Math.round((this.mDisplayWidth - mDisplayPadding * 2) * level / 100f); float mDensity = getResources().getDisplayMetrics().density; @@ -317,10 +320,10 @@ public Shader resize(int width, int height) { } else { int shadowPadding = sbHeight - mHeight; paint.setShadowLayer( - (mGlow / 100f) * (sbHeight - 9 * mDensity), - (mCentered || mDisplayPadding > 0) ? 0 : shadowPadding / 2f, - mBottom ? mHeight - 10 : 10 - mHeight, - Color.argb(Math.min(Math.round(mGlow / 100f * 255), Math.round(255 - mTransparency / 100f * 255)), Color.red(color), Color.green(color), Color.blue(color)) + (mGlow / 100f) * (sbHeight - 9 * mDensity), + (mCentered || mDisplayPadding > 0) ? 0 : shadowPadding / 2f, + mBottom ? mHeight - 10 : 10 - mHeight, + Color.argb(Math.min(Math.round(mGlow / 100f * 255), Math.round(255 - mTransparency / 100f * 255)), Color.red(color), Color.green(color), Color.blue(color)) ); if (mDisplayPadding == 0) setPadding(mCentered ? 0 : -shadowPadding, mBottom ? shadowPadding : -shadowPadding, mCentered ? 0 : Math.min(mDisplayWidth - mWidth, shadowPadding), mBottom ? -shadowPadding : shadowPadding); @@ -336,4 +339,4 @@ public Shader resize(int width, int height) { } } -} \ No newline at end of file +} diff --git a/app/src/main/java/com/sevtinge/cemiuiler/view/BlurFrameLayout.java b/app/src/main/java/com/sevtinge/cemiuiler/view/BlurFrameLayout.java index 897a5c9f36..c631a30289 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/view/BlurFrameLayout.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/view/BlurFrameLayout.java @@ -44,10 +44,10 @@ public BlurFrameLayout(View view, String key) { String mBlurRadiusKey = key + "_blur_radius"; - mBlurRadius = XposedInit.mPrefsMap.getInt(mBlurRadiusKey,60); + mBlurRadius = XposedInit.mPrefsMap.getInt(mBlurRadiusKey, 60); - mBgColor = XposedInit.mPrefsMap.getInt(mBgColorKey,-1); - mBgAlpha = XposedInit.mPrefsMap.getInt(mBgAlphaKey,60); + mBgColor = XposedInit.mPrefsMap.getInt(mBgColorKey, -1); + mBgAlpha = XposedInit.mPrefsMap.getInt(mBgAlphaKey, 60); mBgCornerRadius = DisplayUtils.dip2px(mContext, XposedInit.mPrefsMap.getInt(mBgCornerRadiusKey, 90)); } setOnAttachStateChangeListener(mBlurView); @@ -57,8 +57,8 @@ private void setOnAttachStateChangeListener(View view) { view.addOnAttachStateChangeListener(new View.OnAttachStateChangeListener() { @Override public void onViewAttachedToWindow(View v) { - mViewRootImpl = XposedHelpers.callMethod(v,"getViewRootImpl"); - mBlurDrawable = (Drawable) XposedHelpers.callMethod(mViewRootImpl,"createBackgroundBlurDrawable",new Object[0]); + mViewRootImpl = XposedHelpers.callMethod(v, "getViewRootImpl"); + mBlurDrawable = (Drawable) XposedHelpers.callMethod(mViewRootImpl, "createBackgroundBlurDrawable", new Object[0]); setBackgroundDrawable(mContext, v, isBlurEnable, mBgColor, mBgAlpha, mBgCornerRadius, mBlurRadius); } @@ -85,15 +85,15 @@ public void setColor(int color, int alpha) { int mColorRed = (color & 0x00ff0000) >> 16; int mColorGreen = (color & 0x0000ff00) >> 8; int mColorBlue = (color & 0x000000ff); - XposedHelpers.callMethod(mBlurDrawable,"setColor", Color.argb(alpha, mColorRed, mColorGreen, mColorBlue)); + XposedHelpers.callMethod(mBlurDrawable, "setColor", Color.argb(alpha, mColorRed, mColorGreen, mColorBlue)); } public void setCornerRadius(int cornerRadius) { - XposedHelpers.callMethod(mBlurDrawable,"setCornerRadius", cornerRadius); + XposedHelpers.callMethod(mBlurDrawable, "setCornerRadius", cornerRadius); } public void setBlurRadius(int blurRadius) { - XposedHelpers.callMethod(mBlurDrawable,"setBlurRadius", blurRadius); + XposedHelpers.callMethod(mBlurDrawable, "setBlurRadius", blurRadius); } private GradientDrawable createGradientDrawable(Context context, int color, int alpha, int cornerRadius) { diff --git a/app/src/main/java/com/sevtinge/cemiuiler/view/BubbleSeekBar.java b/app/src/main/java/com/sevtinge/cemiuiler/view/BubbleSeekBar.java index cb003eae61..6e9d66e60e 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/view/BubbleSeekBar.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/view/BubbleSeekBar.java @@ -15,8 +15,6 @@ import android.widget.PopupWindow; import android.widget.TextView; -import moralnorm.annotation.Nullable; - import com.sevtinge.cemiuiler.R; import java.util.Collection; @@ -31,6 +29,7 @@ import moralnorm.animation.property.ValueProperty; import moralnorm.animation.utils.EaseManager; import moralnorm.animation.utils.EaseManager.EaseStyleDef; +import moralnorm.annotation.Nullable; public class BubbleSeekBar extends View { @@ -129,22 +128,22 @@ public void onUpdate(Object o, Collection collection) { var4 = UpdateInfo.findBy(collection, ANIM_EMPTY_HEIGHT); if (var4 != null) { - mCurrentEmptyProgressHeight = (float)var4.getIntValue(); + mCurrentEmptyProgressHeight = (float) var4.getIntValue(); } var4 = UpdateInfo.findBy(collection, ANIM_FILL_HEIGHT); if (var4 != null) { - mCurrentFillProgressHeight = (float)var4.getIntValue(); + mCurrentFillProgressHeight = (float) var4.getIntValue(); } var4 = UpdateInfo.findBy(collection, ANIM_EMPTY_WIDTH); if (var4 != null) { - mCurrentEmptyProgressWidth = (float)var4.getIntValue(); + mCurrentEmptyProgressWidth = (float) var4.getIntValue(); } var4 = UpdateInfo.findBy(collection, ANIM_SLIDER_WIDTH); if (var4 != null) { - mCurrentSliderWidth = (float)var4.getIntValue(); + mCurrentSliderWidth = (float) var4.getIntValue(); } invalidate(); } @@ -252,7 +251,7 @@ public final void initPaint() { public final void initPopupWindow() { mShowBubbleConfig = new AnimConfig(); mShowBubbleConfig.setMinDuration(200L); - mShowBubbleConfig.setEase(EaseManager.getStyle(EaseStyleDef.SPRING_PHY,0.9f, 0.3f)); + mShowBubbleConfig.setEase(EaseManager.getStyle(EaseStyleDef.SPRING_PHY, 0.9f, 0.3f)); mShowBubbleConfig.setSpecial(ANIM_Y, EaseManager.getStyle(EaseStyleDef.SPRING_PHY, 0.9f, 0.2f), 0); mShowBubbleConfig.setSpecial(ANIM_WIDTH, EaseManager.getStyle(EaseStyleDef.SPRING_PHY, 0.9f, 0.2f), 0); mShowBubbleConfig.setSpecial(ANIM_ALPHA, EaseManager.getStyle(EaseStyleDef.CUBIC_OUT, 100f), 0); @@ -264,7 +263,7 @@ public final void initPopupWindow() { mHideBubbleConfig.setSpecial(ANIM_WIDTH, EaseManager.getStyle(EaseStyleDef.CUBIC_IN, 250f), 0); mHideBubbleConfig.setSpecial(ANIM_ALPHA, EaseManager.getStyle(EaseStyleDef.CUBIC_OUT, 100f), 150L, 0); - View contentView = LayoutInflater.from(getContext()).inflate(R.layout.bubble_seek_bar_window, (ViewGroup)null); + View contentView = LayoutInflater.from(getContext()).inflate(R.layout.bubble_seek_bar_window, (ViewGroup) null); mPopWindowContentView = contentView.findViewById(R.id.rl_content_view); mProgressTv = (TextView) mPopWindowContentView.findViewById(R.id.tv_progress); mBubble = new Bubble(contentView, mPopWidowSize, mPopWidowSize, false); @@ -292,10 +291,10 @@ protected void onDetachedFromWindow() { @SuppressLint("DrawAllocation") protected void onDraw(Canvas canvas) { super.onDraw(canvas); - float f5 = ((float)mBsbVisibilityHeight - mCurrentFillProgressHeight) / 2.0F; + float f5 = ((float) mBsbVisibilityHeight - mCurrentFillProgressHeight) / 2.0F; if (mBubble.isShowing() && !mHideBubble) { ViewGroup.LayoutParams lp = mPopWindowContentView.getLayoutParams(); - mPopX = (int)((float)mOffsetX + ((((float)(mBsbVisibilityWidth - mBsbVisibilityHeight)) * (mCurrentProgress + mDeviationProgress - (float)mMinProgress) / (float)(mMaxProgress - mMinProgress)) + (float) (mBsbVisibilityHeight / 2)) - (float)(mPopWidowSize / 2)); + mPopX = (int) ((float) mOffsetX + ((((float) (mBsbVisibilityWidth - mBsbVisibilityHeight)) * (mCurrentProgress + mDeviationProgress - (float) mMinProgress) / (float) (mMaxProgress - mMinProgress)) + (float) (mBsbVisibilityHeight / 2)) - (float) (mPopWidowSize / 2)); mPopY = -(mBsbVisibilityHeight + mOffsetY + mPopWidowSize + mBubbleY - mPopWidowPadding); mBubble.update(this, mPopX, mPopY, mPopWidowSize, mPopWidowSize); lp.width = mPopWindowContentViewSize; @@ -305,41 +304,41 @@ protected void onDraw(Canvas canvas) { } mBsbSliderToFillGap = getContext().getResources().getDimensionPixelSize(mIsPress ? R.dimen.magic_bubble_seek_bar_slider_to_fill_gap_highlight : R.dimen.magic_bubble_seek_bar_slider_to_fill_gap_normal); - float var8 = (mCurrentProgress + mDeviationProgress - (float)mMinProgress) / (float)(mMaxProgress - mMinProgress); - mProgressPosition = (float)(mBsbVisibilityWidth - mBsbVisibilityHeight) * var8 + (float)(this.mEmptyProgressHeight / 2) + (float) mBsbSliderToFillGap; + float var8 = (mCurrentProgress + mDeviationProgress - (float) mMinProgress) / (float) (mMaxProgress - mMinProgress); + mProgressPosition = (float) (mBsbVisibilityWidth - mBsbVisibilityHeight) * var8 + (float) (this.mEmptyProgressHeight / 2) + (float) mBsbSliderToFillGap; - RectF r = new RectF((float)mOffsetX + (((float) mBsbVisibilityWidth - mCurrentEmptyProgressWidth) / 2f), (float)mOffsetY + (((float)mBsbVisibilityHeight - mCurrentEmptyProgressHeight) / 2f), (float)this.mBsbVisibilityWidth - (((float) mBsbVisibilityWidth - mCurrentEmptyProgressWidth) / 2f) + (float)mOffsetX, (float)this.mBsbVisibilityHeight - (((float)mBsbVisibilityHeight - mCurrentEmptyProgressHeight) / 2f) + (float)mOffsetY); + RectF r = new RectF((float) mOffsetX + (((float) mBsbVisibilityWidth - mCurrentEmptyProgressWidth) / 2f), (float) mOffsetY + (((float) mBsbVisibilityHeight - mCurrentEmptyProgressHeight) / 2f), (float) this.mBsbVisibilityWidth - (((float) mBsbVisibilityWidth - mCurrentEmptyProgressWidth) / 2f) + (float) mOffsetX, (float) this.mBsbVisibilityHeight - (((float) mBsbVisibilityHeight - mCurrentEmptyProgressHeight) / 2f) + (float) mOffsetY); canvas.drawRoundRect(r, mCurrentEmptyProgressHeight, mCurrentEmptyProgressHeight, mPaintEmpty); - mProgressPosition = Math.min(mProgressPosition, (float)mBsbVisibilityWidth - f5 - mCurrentFillProgressHeight / 2.0F); + mProgressPosition = Math.min(mProgressPosition, (float) mBsbVisibilityWidth - f5 - mCurrentFillProgressHeight / 2.0F); mProgressPosition = Math.max(mProgressPosition, mCurrentFillProgressHeight / 2f + f5); - mStartPointProportion = (float)(mStartPointProgress - mMinProgress) / (float)(mMaxProgress - mMinProgress); + mStartPointProportion = (float) (mStartPointProgress - mMinProgress) / (float) (mMaxProgress - mMinProgress); RectF rectF; if (mStartPointProportion == 0f) { - rectF = new RectF((float) mOffsetX + f5, (float)mOffsetY + f5, (float)mOffsetX + mProgressPosition + mCurrentFillProgressHeight / 2.0F + 4.0F, (float)(mOffsetY + mBsbVisibilityHeight) - f5); + rectF = new RectF((float) mOffsetX + f5, (float) mOffsetY + f5, (float) mOffsetX + mProgressPosition + mCurrentFillProgressHeight / 2.0F + 4.0F, (float) (mOffsetY + mBsbVisibilityHeight) - f5); } else { float f; float f2; if (var8 > mStartPointProportion) { - f = (float)(mWidth / 2); + f = (float) (mWidth / 2); } else { - f = (float)mOffsetX + mProgressPosition; + f = (float) mOffsetX + mProgressPosition; } if (var8 < mStartPointProportion) { - f2 = (float)(mWidth / 2); + f2 = (float) (mWidth / 2); } else { f2 = (float) mOffsetX + mProgressPosition; } - rectF = new RectF(f - (mCurrentFillProgressHeight / 2f), (float) mOffsetY + f5, f2 + mCurrentFillProgressHeight / 2.0F, (float)(mOffsetY + mBsbVisibilityHeight) - f5); + rectF = new RectF(f - (mCurrentFillProgressHeight / 2f), (float) mOffsetY + f5, f2 + mCurrentFillProgressHeight / 2.0F, (float) (mOffsetY + mBsbVisibilityHeight) - f5); } canvas.drawRoundRect(rectF, mCurrentFillProgressHeight, mCurrentFillProgressHeight, mPaintFill); if (!mSliderEenlargeHide) { - float f = mCurrentSliderWidth == 0f ? (mCurrentFillProgressHeight - (float)(mBsbSliderToFillGap * 2)) / 2f : mCurrentSliderWidth / 2f; - canvas.drawCircle((float) mOffsetX + mProgressPosition, (float)mOffsetY + f5 + (mCurrentFillProgressHeight / 2.0F), f, mPaintSlider); + float f = mCurrentSliderWidth == 0f ? (mCurrentFillProgressHeight - (float) (mBsbSliderToFillGap * 2)) / 2f : mCurrentSliderWidth / 2f; + canvas.drawCircle((float) mOffsetX + mProgressPosition, (float) mOffsetY + f5 + (mCurrentFillProgressHeight / 2.0F), f, mPaintSlider); } } @@ -370,45 +369,45 @@ public boolean onTouchEvent(MotionEvent var1) { if (var2 == 0) { this.mIsPress = true; this.mPressX = var1.getX(); - this.mProgressTv.setText(String.valueOf((int)this.mCurrentProgress)); + this.mProgressTv.setText(String.valueOf((int) this.mCurrentProgress)); if (mProgressListener != null) { mProgressListener.onStartTrackingTouch(this); } AnimState var16 = new AnimState("showFrom"); var5 = ANIM_EMPTY_HEIGHT; - var6 = (double)this.mCurrentEmptyProgressHeight; + var6 = (double) this.mCurrentEmptyProgressHeight; var16 = var16.add(var5, var6); ValueProperty var23 = ANIM_FILL_HEIGHT; - var6 = (double)this.mCurrentFillProgressHeight; + var6 = (double) this.mCurrentFillProgressHeight; var16 = var16.add(var23, var6); ValueProperty var30 = ANIM_EMPTY_WIDTH; - var6 = (double)this.mCurrentEmptyProgressWidth; + var6 = (double) this.mCurrentEmptyProgressWidth; var16 = var16.add(var30, var6); var13 = ANIM_SLIDER_WIDTH; - var6 = (double)this.mCurrentSliderWidth; + var6 = (double) this.mCurrentSliderWidth; var16 = var16.add(var13, var6); IntValueProperty var24 = ANIM_Y; - var6 = (double)this.mBubbleY; + var6 = (double) this.mBubbleY; var16 = var16.add(var24, var6); IntValueProperty var19 = ANIM_WIDTH; - var6 = (double)this.mPopWindowContentViewSize; + var6 = (double) this.mPopWindowContentViewSize; var16 = var16.add(var19, var6); var9 = ANIM_ALPHA; - var6 = (double)this.mPopWindowContentViewAlpha; + var6 = (double) this.mPopWindowContentViewAlpha; var16 = var16.add(var9, var6); AnimState var20 = new AnimState("showTo"); - var6 = (double)((float)this.mBsbVisibilityHeight); + var6 = (double) ((float) this.mBsbVisibilityHeight); var18 = var20.add(var5, var6); - var6 = (double)((float)this.mBsbVisibilityHeight); + var6 = (double) ((float) this.mBsbVisibilityHeight); AnimState var25 = var18.add(var23, var6); - var6 = (double)((float)this.mBsbVisibilityWidth); + var6 = (double) ((float) this.mBsbVisibilityWidth); AnimState var31 = var25.add(var30, var6); - var6 = (double)((float)this.mSliderWidthHighlight); + var6 = (double) ((float) this.mSliderWidthHighlight); AnimState var34 = var31.add(var13, var6); - var6 = (double)(this.mBubbleSeekbarDistance + this.mPopWidowPadding); + var6 = (double) (this.mBubbleSeekbarDistance + this.mPopWidowPadding); var22 = var34.add(var24, var6); - var6 = (double)this.mPopWidowSize; + var6 = (double) this.mPopWidowSize; var17 = var22.add(var19, var6); var17 = var17.add(var9, 1.0D); Folme.useValue(new Object[]{this.mIdentityHashCode}).cancel(); @@ -424,13 +423,13 @@ public boolean onTouchEvent(MotionEvent var1) { if (var2 == 2) { float var3 = var1.getX() - this.mPressX; this.mMoveOffset = var3; - var3 = (float)(this.mMaxProgress - this.mMinProgress) * var3 / (float)(this.mBsbVisibilityWidth - this.mBsbVisibilityHeight); + var3 = (float) (this.mMaxProgress - this.mMinProgress) * var3 / (float) (this.mBsbVisibilityWidth - this.mBsbVisibilityHeight); this.mDeviationProgress = var3; - var3 = Math.min(var3, (float)this.getMaxProgress() - this.mCurrentProgress); + var3 = Math.min(var3, (float) this.getMaxProgress() - this.mCurrentProgress); this.mDeviationProgress = var3; - var3 = Math.max(var3, (float)getMinProgress() - this.mCurrentProgress); + var3 = Math.max(var3, (float) getMinProgress() - this.mCurrentProgress); this.mDeviationProgress = var3; - var2 = (int)(this.mCurrentProgress + var3); + var2 = (int) (this.mCurrentProgress + var3); this.mProgressTv.setText(String.valueOf(var2)); if (this.mProgressListener != null) { if (this.mPreviousProgress == var2 && (var2 == this.getMaxProgress() || var2 == this.getMinProgress() || var2 == 0)) { @@ -465,37 +464,37 @@ public boolean onTouchEvent(MotionEvent var1) { Folme.useValue(new Object[]{this.mIdentityHashCode}).cancel(); var17 = new AnimState("hideFrom"); var5 = ANIM_EMPTY_HEIGHT; - var6 = (double)this.mCurrentEmptyProgressHeight; + var6 = (double) this.mCurrentEmptyProgressHeight; var17 = var17.add(var5, var6); ValueProperty var8 = ANIM_FILL_HEIGHT; - var6 = (double)this.mCurrentFillProgressHeight; + var6 = (double) this.mCurrentFillProgressHeight; var17 = var17.add(var8, var6); var9 = ANIM_EMPTY_WIDTH; - var6 = (double)this.mCurrentEmptyProgressWidth; + var6 = (double) this.mCurrentEmptyProgressWidth; var17 = var17.add(var9, var6); ValueProperty var10 = ANIM_SLIDER_WIDTH; - var6 = (double)this.mCurrentSliderWidth; + var6 = (double) this.mCurrentSliderWidth; var17 = var17.add(var10, var6); IntValueProperty var11 = ANIM_Y; - var6 = (double)this.mBubbleY; + var6 = (double) this.mBubbleY; var17 = var17.add(var11, var6); IntValueProperty var12 = ANIM_WIDTH; - var6 = (double)this.mPopWindowContentViewSize; + var6 = (double) this.mPopWindowContentViewSize; var17 = var17.add(var12, var6); var13 = ANIM_ALPHA; - var6 = (double)this.mPopWindowContentViewAlpha; + var6 = (double) this.mPopWindowContentViewAlpha; var17 = var17.add(var13, var6); AnimState var14 = new AnimState("hideTo"); - var6 = (double)((float)this.mEmptyProgressHeight); + var6 = (double) ((float) this.mEmptyProgressHeight); var18 = var14.add(var5, var6); - var6 = (double)((float)this.mFillProgressHeight); + var6 = (double) ((float) this.mFillProgressHeight); var18 = var18.add(var8, var6); - var6 = (double)((float)this.mBsbNormalWidth); + var6 = (double) ((float) this.mBsbNormalWidth); AnimState var21 = var18.add(var9, var6); - var6 = (double)((float)this.mSliderWidth); + var6 = (double) ((float) this.mSliderWidth); var22 = var21.add(var10, var6); var22 = var22.add(var11, 0.0D); - var6 = (double)this.mBubbleWidthNormal; + var6 = (double) this.mBubbleWidthNormal; var22 = var22.add(var12, var6); var22 = var22.add(var13, 0.0D); IStateStyle var27 = Folme.useValue(this.mIdentityHashCode); @@ -515,7 +514,7 @@ public void setCurrentFillHeight(float currentFillHeight) { public void setCurrentHeight(float currentHeight) { mCurrentEmptyProgressHeight = currentHeight; if (mEnlargeAnimListener != null) { - mEnlargeAnimListener.onAnimProgressChanged((int)((float) mMaxProgress * (currentHeight - (float) mEmptyProgressHeight) / (float)(this.mBsbVisibilityHeight - mEmptyProgressHeight))); + mEnlargeAnimListener.onAnimProgressChanged((int) ((float) mMaxProgress * (currentHeight - (float) mEmptyProgressHeight) / (float) (this.mBsbVisibilityHeight - mEmptyProgressHeight))); } invalidate(); } @@ -568,7 +567,8 @@ public interface EnlargeAnimListener { public interface ProgressListener { - default void onProgressStartChange(BubbleSeekBar seekBar, int progress) {} + default void onProgressStartChange(BubbleSeekBar seekBar, int progress) { + } void onProgressChanged(BubbleSeekBar seekBar, int progress); diff --git a/app/src/main/java/com/sevtinge/cemiuiler/view/CircleImageView.java b/app/src/main/java/com/sevtinge/cemiuiler/view/CircleImageView.java index b6d9884e8b..c70f761c02 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/view/CircleImageView.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/view/CircleImageView.java @@ -18,7 +18,6 @@ import android.util.AttributeSet; import android.widget.ImageView; - import com.sevtinge.cemiuiler.R; import moralnorm.annotation.ColorInt; @@ -330,4 +329,4 @@ private void updateShaderMatrix() { mBitmapShader.setLocalMatrix(mShaderMatrix); } -} \ No newline at end of file +} diff --git a/app/src/main/java/com/sevtinge/cemiuiler/view/CustomMultipleChoiceView.java b/app/src/main/java/com/sevtinge/cemiuiler/view/CustomMultipleChoiceView.java index 1ebe746c89..79b24dceae 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/view/CustomMultipleChoiceView.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/view/CustomMultipleChoiceView.java @@ -23,8 +23,8 @@ public class CustomMultipleChoiceView extends LinearLayout { private MutipleChoiceAdapter mAdapter; private List mData; private ListView mListView; - private onCheckedListener mOnCheckedListener;//确定选择监听器 - private boolean curWillCheckAll = true;//当前点击按钮时是否将全选 + private onCheckedListener mOnCheckedListener;// 确定选择监听器 + private boolean curWillCheckAll = true;// 当前点击按钮时是否将全选 public CustomMultipleChoiceView(Context context) { super(context); @@ -37,7 +37,7 @@ public CustomMultipleChoiceView(Context context, @Nullable AttributeSet attrs) { } @SuppressLint("InflateParams") - private void initView(){ + private void initView() { /* 实例化各个控件 */ LayoutInflater inflater = LayoutInflater.from(getContext()); View view = inflater.inflate(R.layout.view_custom_mutiplechoice, null); @@ -71,7 +71,7 @@ public void setData(List data, boolean[] isSelected) { if (data != null) { mData = data; mAdapter = new MutipleChoiceAdapter(getContext(), data); - if (isSelected != null){ + if (isSelected != null) { if (isSelected.length != data.size()) { throw new IllegalArgumentException("data's length not equal the isSelected's length"); } else { @@ -88,19 +88,19 @@ public void setData(List data, boolean[] isSelected) { } } - public void setOnCheckedListener(onCheckedListener listener){ + public void setOnCheckedListener(onCheckedListener listener) { mOnCheckedListener = listener; } - public interface onCheckedListener{ + public interface onCheckedListener { void onChecked(SparseBooleanArray sparseBooleanArray); } /** * 全选 */ - public void selectAll(){ - if(mData != null){ + public void selectAll() { + if (mData != null) { for (int i = 0; i < mData.size(); i++) { mAdapter.getCheckedArray().put(i, true); } @@ -112,8 +112,8 @@ public void selectAll(){ /** * 全不选 */ - public void deselectAll(){ - if(mData != null){ + public void deselectAll() { + if (mData != null) { for (int i = 0; i < mData.size(); i++) { mAdapter.getCheckedArray().put(i, false); } @@ -121,10 +121,11 @@ public void deselectAll(){ mAdapter.notifyDataSetChanged(); } } + /** * 反选 */ - public void reverseSelect(){ + public void reverseSelect() { if (mData != null) { for (int i = 0; i < mData.size(); i++) { mAdapter.getCheckedArray().put(i, !mAdapter.getCheckedArray().get(i)); @@ -134,28 +135,28 @@ public void reverseSelect(){ } } - private class OnCustomMultipleChoiceCheckedListener implements OnClickListener{ + private class OnCustomMultipleChoiceCheckedListener implements OnClickListener { @Override public void onClick(View v) { switch (v.getId()) { case android.R.id.button1: - //确定选择的按钮 - if(mOnCheckedListener != null && mAdapter != null){ + // 确定选择的按钮 + if (mOnCheckedListener != null && mAdapter != null) { mOnCheckedListener.onChecked(mAdapter.getCheckedArray()); } break; case android.R.id.button2: - //全选/反选按钮 - if(mData != null){ - if(curWillCheckAll) { + // 全选/反选按钮 + if (mData != null) { + if (curWillCheckAll) { selectAll(); } else { deselectAll(); } - ((Button)v).setText(curWillCheckAll ? "反选" : "全选"); + ((Button) v).setText(curWillCheckAll ? "反选" : "全选"); curWillCheckAll = !curWillCheckAll; } break; diff --git a/app/src/main/java/com/sevtinge/cemiuiler/view/SpinnerEx.java b/app/src/main/java/com/sevtinge/cemiuiler/view/SpinnerEx.java index b4c191bee2..9386e2bcce 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/view/SpinnerEx.java +++ b/app/src/main/java/com/sevtinge/cemiuiler/view/SpinnerEx.java @@ -21,7 +21,7 @@ public class SpinnerEx extends Spinner { public SpinnerEx(Context context, AttributeSet attrs) { super(context, attrs); - final TypedArray xmlAttrs = context.obtainStyledAttributes(attrs, new int[] { android.R.attr.entries, 0 } ); + final TypedArray xmlAttrs = context.obtainStyledAttributes(attrs, new int[]{android.R.attr.entries, 0}); entries = xmlAttrs.getTextArray(0); if (xmlAttrs.getResourceId(1, 0) != 0) entryValues = getResources().getIntArray(xmlAttrs.getResourceId(1, 0)); xmlAttrs.recycle(); diff --git a/app/src/main/java/com/sevtinge/cemiuiler/view/WeatherData.kt b/app/src/main/java/com/sevtinge/cemiuiler/view/WeatherData.kt index 8fb3a3b37a..2a565a8b80 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/view/WeatherData.kt +++ b/app/src/main/java/com/sevtinge/cemiuiler/view/WeatherData.kt @@ -56,9 +56,17 @@ class WeatherData(val context: Context?, private val showCity: Boolean) { if (query != null) { if (query.moveToFirst()) { str = if (showCity) { - query.getString(query.getColumnIndexOrThrow("city_name")) + " " + query.getString(query.getColumnIndexOrThrow("description")) + " " + query.getString(query.getColumnIndexOrThrow("temperature")) + query.getString(query.getColumnIndexOrThrow("city_name")) + " " + query.getString( + query.getColumnIndexOrThrow( + "description" + ) + ) + " " + query.getString(query.getColumnIndexOrThrow("temperature")) } else { - query.getString(query.getColumnIndexOrThrow("description")) + " " + query.getString(query.getColumnIndexOrThrow("temperature")) + query.getString(query.getColumnIndexOrThrow("description")) + " " + query.getString( + query.getColumnIndexOrThrow( + "temperature" + ) + ) } } query.close() @@ -85,7 +93,8 @@ class WeatherData(val context: Context?, private val showCity: Boolean) { } fun startCalendarApp() { - mContext.classLoader.loadClass("com.miui.systemui.util.CommonUtil").callStaticMethod("startCalendarApp", args(context), argTypes(Context::class.java)) + mContext.classLoader.loadClass("com.miui.systemui.util.CommonUtil") + .callStaticMethod("startCalendarApp", args(context), argTypes(Context::class.java)) } fun startWeatherApp() { @@ -102,4 +111,4 @@ class WeatherData(val context: Context?, private val showCity: Boolean) { Toast.makeText(context, "启动失败", Toast.LENGTH_LONG).show() } } -} \ No newline at end of file +} diff --git a/app/src/main/java/com/sevtinge/cemiuiler/view/WeatherView.kt b/app/src/main/java/com/sevtinge/cemiuiler/view/WeatherView.kt index 7b2709b9f1..b51527ad38 100644 --- a/app/src/main/java/com/sevtinge/cemiuiler/view/WeatherView.kt +++ b/app/src/main/java/com/sevtinge/cemiuiler/view/WeatherView.kt @@ -48,9 +48,17 @@ class WeatherView(context: Context?, private val showCity: Boolean) : TextView(c if (query != null) { if (query.moveToFirst()) { str = if (showCity) { - query.getString(query.getColumnIndexOrThrow("city_name")) + " " + query.getString(query.getColumnIndexOrThrow("description")) + " " + query.getString(query.getColumnIndexOrThrow("temperature")) + query.getString(query.getColumnIndexOrThrow("city_name")) + " " + query.getString( + query.getColumnIndexOrThrow( + "description" + ) + ) + " " + query.getString(query.getColumnIndexOrThrow("temperature")) } else { - query.getString(query.getColumnIndexOrThrow("description")) + " " + query.getString(query.getColumnIndexOrThrow("temperature")) + query.getString(query.getColumnIndexOrThrow("description")) + " " + query.getString( + query.getColumnIndexOrThrow( + "temperature" + ) + ) } } query.close() @@ -77,4 +85,4 @@ class WeatherView(context: Context?, private val showCity: Boolean) : TextView(c } } -} \ No newline at end of file +} diff --git a/app/src/main/res/animator/fragment_close_enter.xml b/app/src/main/res/animator/fragment_close_enter.xml index f6fd84fe76..0bdeed22a9 100644 --- a/app/src/main/res/animator/fragment_close_enter.xml +++ b/app/src/main/res/animator/fragment_close_enter.xml @@ -5,10 +5,10 @@ + android:duration="600" /> + android:duration="600" /> \ No newline at end of file diff --git a/app/src/main/res/animator/fragment_close_exit.xml b/app/src/main/res/animator/fragment_close_exit.xml index a3f3b26abd..dbb794aba7 100644 --- a/app/src/main/res/animator/fragment_close_exit.xml +++ b/app/src/main/res/animator/fragment_close_exit.xml @@ -5,11 +5,11 @@ + android:duration="600" /> + android:duration="600" /> \ No newline at end of file diff --git a/app/src/main/res/animator/fragment_open_enter.xml b/app/src/main/res/animator/fragment_open_enter.xml index 94aa678385..f9fb3b45b4 100644 --- a/app/src/main/res/animator/fragment_open_enter.xml +++ b/app/src/main/res/animator/fragment_open_enter.xml @@ -5,10 +5,10 @@ + android:duration="600" /> + android:duration="300" /> \ No newline at end of file diff --git a/app/src/main/res/animator/fragment_open_exit.xml b/app/src/main/res/animator/fragment_open_exit.xml index 5630666e1e..adca1b14b0 100644 --- a/app/src/main/res/animator/fragment_open_exit.xml +++ b/app/src/main/res/animator/fragment_open_exit.xml @@ -5,10 +5,10 @@ + android:duration="600" /> + android:duration="300" /> \ No newline at end of file diff --git a/app/src/main/res/drawable-v31/ic_launcher_foreground.xml b/app/src/main/res/drawable-v31/ic_launcher_foreground.xml index 798691df66..c20e1b71c2 100644 --- a/app/src/main/res/drawable-v31/ic_launcher_foreground.xml +++ b/app/src/main/res/drawable-v31/ic_launcher_foreground.xml @@ -3,15 +3,15 @@ android:height="200dp" android:viewportWidth="432" android:viewportHeight="432"> - - - + + + diff --git a/app/src/main/res/drawable/bubble_bar_pop_bg.xml b/app/src/main/res/drawable/bubble_bar_pop_bg.xml index 1d1b9fbfbe..87dcb47529 100644 --- a/app/src/main/res/drawable/bubble_bar_pop_bg.xml +++ b/app/src/main/res/drawable/bubble_bar_pop_bg.xml @@ -1,4 +1,5 @@ - + \ No newline at end of file diff --git a/app/src/main/res/drawable/ic_audio_system.xml b/app/src/main/res/drawable/ic_audio_system.xml index 42f179e2c4..d541c11c64 100644 --- a/app/src/main/res/drawable/ic_audio_system.xml +++ b/app/src/main/res/drawable/ic_audio_system.xml @@ -1,14 +1,14 @@ - + android:width="69px" + android:height="60px" + android:viewportWidth="69" + android:viewportHeight="60"> + diff --git a/app/src/main/res/drawable/ic_big_folder_2x1_select_border_bg.xml b/app/src/main/res/drawable/ic_big_folder_2x1_select_border_bg.xml index 133f81de31..0922fd9ebe 100644 --- a/app/src/main/res/drawable/ic_big_folder_2x1_select_border_bg.xml +++ b/app/src/main/res/drawable/ic_big_folder_2x1_select_border_bg.xml @@ -5,44 +5,44 @@ android:viewportWidth="104" android:viewportHeight="104"> - - - - - - - - - - - - - + + + + + + + + + + + + + diff --git a/app/src/main/res/drawable/ic_big_folder_2x1_select_border_bg_dark.xml b/app/src/main/res/drawable/ic_big_folder_2x1_select_border_bg_dark.xml index cfd793b9cc..115d56e8c9 100644 --- a/app/src/main/res/drawable/ic_big_folder_2x1_select_border_bg_dark.xml +++ b/app/src/main/res/drawable/ic_big_folder_2x1_select_border_bg_dark.xml @@ -14,36 +14,36 @@ android:fillColor="#FFFFFFFF" android:fillAlpha="0.18" android:strokeAlpha="0.9" - android:pathData="M20,41L30.8,41a6,6 0,0 1,6 6L36.8,57.8a6,6 0,0 1,-6 6L20,63.8a6,6 0,0 1,-6 -6L14,47a6,6 0,0 1,6 -6Z"/> + android:pathData="M20,41L30.8,41a6,6 0,0 1,6 6L36.8,57.8a6,6 0,0 1,-6 6L20,63.8a6,6 0,0 1,-6 -6L14,47a6,6 0,0 1,6 -6Z" /> + android:pathData="M46.6,41L57.4,41a6,6 0,0 1,6 6L63.4,57.8a6,6 0,0 1,-6 6L46.6,63.8a6,6 0,0 1,-6 -6L40.6,47A6,6 0,0 1,46.6 41Z" /> + android:pathData="M70.2,41h4.31a3,3 0,0 1,3 3v4.31a3,3 0,0 1,-3 3L70.2,51.31a3,3 0,0 1,-3 -3L67.2,44A3,3 0,0 1,70.2 41Z" /> + android:pathData="M70.2,53.48h4.31a3,3 0,0 1,3 3L77.51,60.8a3,3 0,0 1,-3 3L70.2,63.8a3,3 0,0 1,-3 -3L67.2,56.48A3,3 0,0 1,70.2 53.48Z" /> + android:pathData="M82.68,41L87,41a3,3 0,0 1,3 3v4.31a3,3 0,0 1,-3 3L82.68,51.31a3,3 0,0 1,-3 -3L79.68,44A3,3 0,0 1,82.68 41Z" /> + android:pathData="M82.68,53.48L87,53.48a3,3 0,0 1,3 3L90,60.8a3,3 0,0 1,-3 3L82.68,63.8a3,3 0,0 1,-3 -3L79.68,56.48A3,3 0,0 1,82.68 53.48Z" /> diff --git a/app/src/main/res/drawable/ic_big_folder_select_border_bg.xml b/app/src/main/res/drawable/ic_big_folder_select_border_bg.xml index a24b9ae6ab..3d965db4bd 100644 --- a/app/src/main/res/drawable/ic_big_folder_select_border_bg.xml +++ b/app/src/main/res/drawable/ic_big_folder_select_border_bg.xml @@ -3,43 +3,43 @@ android:height="104dp" android:viewportWidth="104" android:viewportHeight="104"> - - - - - - - - - - - - - + + + + + + + + + + + + + diff --git a/app/src/main/res/drawable/ic_big_folder_select_border_bg_dark.xml b/app/src/main/res/drawable/ic_big_folder_select_border_bg_dark.xml index d0da0d88bd..93cc95e727 100644 --- a/app/src/main/res/drawable/ic_big_folder_select_border_bg_dark.xml +++ b/app/src/main/res/drawable/ic_big_folder_select_border_bg_dark.xml @@ -3,56 +3,56 @@ android:height="104dp" android:viewportWidth="104" android:viewportHeight="104"> - - - - - - - - - - - - - + + + + + + + + + + + + + diff --git a/app/src/main/res/drawable/ic_cemiuiler_settings_v130.xml b/app/src/main/res/drawable/ic_cemiuiler_settings_v130.xml index 61bd44bc7d..53f66a97f9 100644 --- a/app/src/main/res/drawable/ic_cemiuiler_settings_v130.xml +++ b/app/src/main/res/drawable/ic_cemiuiler_settings_v130.xml @@ -3,8 +3,7 @@ android:height="32dp" android:viewportWidth="270" android:viewportHeight="270"> - + @@ -12,8 +11,8 @@ android:pathData="M184.33,110.94a52.8,52.8 0,1 1,-63.62 83.72" android:strokeWidth="21" android:strokeColor="#fc5b8d" - android:strokeLineCap="round"/> + android:strokeLineCap="round" /> + android:fillColor="#fc5b8d" /> \ No newline at end of file diff --git a/app/src/main/res/drawable/ic_cemiuiler_settings_v140.xml b/app/src/main/res/drawable/ic_cemiuiler_settings_v140.xml index 397966c98f..4568bf3240 100644 --- a/app/src/main/res/drawable/ic_cemiuiler_settings_v140.xml +++ b/app/src/main/res/drawable/ic_cemiuiler_settings_v140.xml @@ -5,16 +5,16 @@ android:viewportHeight="270"> + android:fillColor="#fc5b8d" /> + android:fillColor="#fff" /> + android:strokeLineCap="round" /> + android:fillColor="#fff" /> diff --git a/app/src/main/res/drawable/ic_control_center_5g_toggle_off.xml b/app/src/main/res/drawable/ic_control_center_5g_toggle_off.xml index 4ca96f1ab9..5baef30522 100644 --- a/app/src/main/res/drawable/ic_control_center_5g_toggle_off.xml +++ b/app/src/main/res/drawable/ic_control_center_5g_toggle_off.xml @@ -6,5 +6,5 @@ android:viewportHeight="30"> + android:pathData="M3.75 16.07L1.5 15.52l0.93-8.58h9.2v2.39H4.77L4.3 13.5c0.27-0.15 0.64-0.3 1.1-0.46 0.47-0.15 1.01-0.23 1.61-0.23 0.8 0 1.53 0.13 2.16 0.4 0.64 0.26 1.18 0.64 1.63 1.14 0.44 0.49 0.78 1.09 1.02 1.8 0.23 0.7 0.35 1.5 0.35 2.38 0 0.79-0.12 1.53-0.35 2.21-0.23 0.7-0.57 1.3-1.03 1.82-0.47 0.52-1.05 0.93-1.75 1.23-0.7 0.29-1.52 0.43-2.47 0.43-0.71 0-1.4-0.1-2.05-0.3-0.65-0.21-1.23-0.52-1.75-0.93-0.52-0.41-0.93-0.92-1.24-1.52-0.32-0.6-0.5-1.3-0.54-2.1h2.76c0.07 0.56 0.23 1.03 0.46 1.42 0.24 0.38 0.56 0.68 0.96 0.88 0.4 0.2 0.86 0.3 1.38 0.3 0.48 0 0.9-0.08 1.24-0.24 0.34-0.17 0.62-0.42 0.85-0.73 0.23-0.32 0.4-0.7 0.52-1.12 0.11-0.43 0.17-0.91 0.17-1.43 0-0.5-0.06-0.96-0.2-1.37C9.01 16.67 8.82 16.3 8.56 16c-0.25-0.3-0.57-0.54-0.95-0.7-0.38-0.18-0.82-0.26-1.32-0.26-0.68 0-1.2 0.1-1.55 0.29-0.35 0.2-0.68 0.44-0.99 0.73Zm24.23-0.79v6.52c-0.25 0.32-0.62 0.67-1.14 1.05-0.5 0.38-1.18 0.7-2.03 0.97-0.84 0.28-1.9 0.41-3.15 0.41-1.07 0-2.05-0.18-2.94-0.53-0.9-0.37-1.66-0.9-2.31-1.61-0.64-0.7-1.14-1.56-1.49-2.57-0.35-1.01-0.53-2.17-0.53-3.47v-1.18c0-1.29 0.16-2.44 0.48-3.44 0.33-1.02 0.8-1.88 1.41-2.58 0.61-0.7 1.34-1.24 2.2-1.6 0.87-0.36 1.85-0.55 2.95-0.55 1.4 0 2.55 0.24 3.46 0.7 0.93 0.47 1.64 1.1 2.14 1.93 0.5 0.82 0.81 1.76 0.95 2.81h-2.89c-0.09-0.6-0.27-1.12-0.55-1.6-0.26-0.46-0.65-0.83-1.15-1.1-0.49-0.27-1.13-0.4-1.92-0.4-0.68 0-1.27 0.12-1.79 0.38s-0.95 0.64-1.29 1.14c-0.34 0.5-0.59 1.1-0.76 1.83-0.17 0.72-0.26 1.54-0.26 2.46v1.2c0 0.94 0.1 1.77 0.3 2.5 0.2 0.73 0.49 1.34 0.86 1.84 0.38 0.5 0.85 0.88 1.4 1.14 0.54 0.25 1.16 0.37 1.85 0.37 0.67 0 1.22-0.05 1.65-0.16 0.43-0.12 0.77-0.26 1.02-0.41 0.26-0.17 0.46-0.32 0.6-0.47v-3.39H21.5v-2.19h6.48Z" /> \ No newline at end of file diff --git a/app/src/main/res/drawable/ic_control_center_5g_toggle_on.xml b/app/src/main/res/drawable/ic_control_center_5g_toggle_on.xml index 4ca96f1ab9..5baef30522 100644 --- a/app/src/main/res/drawable/ic_control_center_5g_toggle_on.xml +++ b/app/src/main/res/drawable/ic_control_center_5g_toggle_on.xml @@ -6,5 +6,5 @@ android:viewportHeight="30"> + android:pathData="M3.75 16.07L1.5 15.52l0.93-8.58h9.2v2.39H4.77L4.3 13.5c0.27-0.15 0.64-0.3 1.1-0.46 0.47-0.15 1.01-0.23 1.61-0.23 0.8 0 1.53 0.13 2.16 0.4 0.64 0.26 1.18 0.64 1.63 1.14 0.44 0.49 0.78 1.09 1.02 1.8 0.23 0.7 0.35 1.5 0.35 2.38 0 0.79-0.12 1.53-0.35 2.21-0.23 0.7-0.57 1.3-1.03 1.82-0.47 0.52-1.05 0.93-1.75 1.23-0.7 0.29-1.52 0.43-2.47 0.43-0.71 0-1.4-0.1-2.05-0.3-0.65-0.21-1.23-0.52-1.75-0.93-0.52-0.41-0.93-0.92-1.24-1.52-0.32-0.6-0.5-1.3-0.54-2.1h2.76c0.07 0.56 0.23 1.03 0.46 1.42 0.24 0.38 0.56 0.68 0.96 0.88 0.4 0.2 0.86 0.3 1.38 0.3 0.48 0 0.9-0.08 1.24-0.24 0.34-0.17 0.62-0.42 0.85-0.73 0.23-0.32 0.4-0.7 0.52-1.12 0.11-0.43 0.17-0.91 0.17-1.43 0-0.5-0.06-0.96-0.2-1.37C9.01 16.67 8.82 16.3 8.56 16c-0.25-0.3-0.57-0.54-0.95-0.7-0.38-0.18-0.82-0.26-1.32-0.26-0.68 0-1.2 0.1-1.55 0.29-0.35 0.2-0.68 0.44-0.99 0.73Zm24.23-0.79v6.52c-0.25 0.32-0.62 0.67-1.14 1.05-0.5 0.38-1.18 0.7-2.03 0.97-0.84 0.28-1.9 0.41-3.15 0.41-1.07 0-2.05-0.18-2.94-0.53-0.9-0.37-1.66-0.9-2.31-1.61-0.64-0.7-1.14-1.56-1.49-2.57-0.35-1.01-0.53-2.17-0.53-3.47v-1.18c0-1.29 0.16-2.44 0.48-3.44 0.33-1.02 0.8-1.88 1.41-2.58 0.61-0.7 1.34-1.24 2.2-1.6 0.87-0.36 1.85-0.55 2.95-0.55 1.4 0 2.55 0.24 3.46 0.7 0.93 0.47 1.64 1.1 2.14 1.93 0.5 0.82 0.81 1.76 0.95 2.81h-2.89c-0.09-0.6-0.27-1.12-0.55-1.6-0.26-0.46-0.65-0.83-1.15-1.1-0.49-0.27-1.13-0.4-1.92-0.4-0.68 0-1.27 0.12-1.79 0.38s-0.95 0.64-1.29 1.14c-0.34 0.5-0.59 1.1-0.76 1.83-0.17 0.72-0.26 1.54-0.26 2.46v1.2c0 0.94 0.1 1.77 0.3 2.5 0.2 0.73 0.49 1.34 0.86 1.84 0.38 0.5 0.85 0.88 1.4 1.14 0.54 0.25 1.16 0.37 1.85 0.37 0.67 0 1.22-0.05 1.65-0.16 0.43-0.12 0.77-0.26 1.02-0.41 0.26-0.17 0.46-0.32 0.6-0.47v-3.39H21.5v-2.19h6.48Z" /> \ No newline at end of file diff --git a/app/src/main/res/drawable/ic_launcher_foreground.xml b/app/src/main/res/drawable/ic_launcher_foreground.xml index b843c645ee..70b9879048 100644 --- a/app/src/main/res/drawable/ic_launcher_foreground.xml +++ b/app/src/main/res/drawable/ic_launcher_foreground.xml @@ -3,15 +3,15 @@ android:height="200dp" android:viewportWidth="432" android:viewportHeight="432"> - - - + + + diff --git a/app/src/main/res/drawable/ic_packageinstaller_background_dark.xml b/app/src/main/res/drawable/ic_packageinstaller_background_dark.xml index fbcf6c1e99..54199849a9 100644 --- a/app/src/main/res/drawable/ic_packageinstaller_background_dark.xml +++ b/app/src/main/res/drawable/ic_packageinstaller_background_dark.xml @@ -1,6 +1,6 @@ + android:shape="rectangle"> \ No newline at end of file diff --git a/app/src/main/res/drawable/ic_packageinstaller_background_light.xml b/app/src/main/res/drawable/ic_packageinstaller_background_light.xml index c5e295a6ff..0814f307c4 100644 --- a/app/src/main/res/drawable/ic_packageinstaller_background_light.xml +++ b/app/src/main/res/drawable/ic_packageinstaller_background_light.xml @@ -1,6 +1,6 @@ + android:shape="rectangle"> \ No newline at end of file diff --git a/app/src/main/res/drawable/ic_qs_tile_bg_disabled.xml b/app/src/main/res/drawable/ic_qs_tile_bg_disabled.xml index b5a91af5fc..392e0bcbe1 100644 --- a/app/src/main/res/drawable/ic_qs_tile_bg_disabled.xml +++ b/app/src/main/res/drawable/ic_qs_tile_bg_disabled.xml @@ -5,5 +5,5 @@ android:viewportHeight="65"> + android:pathData="M0 18c0-9.94 8.06-18 18-18h29c9.94 0 18 8.06 18 18v29c0 9.94-8.06 18-18 18h-29c-9.94 0-18-8.06-18-18z" /> \ No newline at end of file diff --git a/app/src/main/res/drawable/ic_qs_tile_bg_enabled.xml b/app/src/main/res/drawable/ic_qs_tile_bg_enabled.xml index 10c64bb3ed..cdfaa04a0d 100644 --- a/app/src/main/res/drawable/ic_qs_tile_bg_enabled.xml +++ b/app/src/main/res/drawable/ic_qs_tile_bg_enabled.xml @@ -5,5 +5,5 @@ android:viewportHeight="65"> + android:pathData="M0 18c0-9.94 8.06-18 18-18h29c9.94 0 18 8.06 18 18v29c0 9.94-8.06 18-18 18h-29c-9.94 0-18-8.06-18-18z" /> \ No newline at end of file diff --git a/app/src/main/res/drawable/ic_qs_tile_bg_warning.xml b/app/src/main/res/drawable/ic_qs_tile_bg_warning.xml index 9e3dab0b5f..06a6a379d4 100644 --- a/app/src/main/res/drawable/ic_qs_tile_bg_warning.xml +++ b/app/src/main/res/drawable/ic_qs_tile_bg_warning.xml @@ -5,5 +5,5 @@ android:viewportHeight="65"> + android:pathData="M0 18c0-9.94 8.06-18 18-18h29c9.94 0 18 8.06 18 18v29c0 9.94-8.06 18-18 18h-29c-9.94 0-18-8.06-18-18z" /> \ No newline at end of file diff --git a/app/src/main/res/drawable/ic_reboot_small.xml b/app/src/main/res/drawable/ic_reboot_small.xml index 2e2a84fde8..42648737fc 100644 --- a/app/src/main/res/drawable/ic_reboot_small.xml +++ b/app/src/main/res/drawable/ic_reboot_small.xml @@ -3,7 +3,7 @@ android:height="25dp" android:viewportWidth="1024" android:viewportHeight="1024"> - + diff --git a/app/src/main/res/drawable/ic_small_window.xml b/app/src/main/res/drawable/ic_small_window.xml index 862bd7ec7e..af2433cb85 100644 --- a/app/src/main/res/drawable/ic_small_window.xml +++ b/app/src/main/res/drawable/ic_small_window.xml @@ -4,20 +4,20 @@ android:width="36.359989dp" android:viewportWidth="100.0" android:viewportHeight="84.0"> - - - + + - - + android:fillColor="@color/ic_small_window_color3" + android:pathData="M78,32m-16,0a16,16 0,1 1,32 0a16,16 0,1 1,-32 0" /> + + \ No newline at end of file diff --git a/app/src/main/res/drawable/statusbar_signal_1_0.xml b/app/src/main/res/drawable/statusbar_signal_1_0.xml index a957736083..592c9d0820 100644 --- a/app/src/main/res/drawable/statusbar_signal_1_0.xml +++ b/app/src/main/res/drawable/statusbar_signal_1_0.xml @@ -1,18 +1,18 @@ - - - - + android:viewportWidth="60" + android:viewportHeight="56" + android:width="60dp" + android:height="56dp"> + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/statusbar_signal_1_0_dark.xml b/app/src/main/res/drawable/statusbar_signal_1_0_dark.xml index a0907caa2e..5c2a93acb1 100644 --- a/app/src/main/res/drawable/statusbar_signal_1_0_dark.xml +++ b/app/src/main/res/drawable/statusbar_signal_1_0_dark.xml @@ -1,18 +1,18 @@ - - - - + android:viewportWidth="60" + android:viewportHeight="56" + android:width="60dp" + android:height="56dp"> + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/statusbar_signal_1_0_dark_thick.xml b/app/src/main/res/drawable/statusbar_signal_1_0_dark_thick.xml index 6732f089c0..2a3acf6ecb 100644 --- a/app/src/main/res/drawable/statusbar_signal_1_0_dark_thick.xml +++ b/app/src/main/res/drawable/statusbar_signal_1_0_dark_thick.xml @@ -1,18 +1,18 @@ - - - - + android:viewportWidth="60" + android:viewportHeight="56" + android:width="60dp" + android:height="56dp"> + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/statusbar_signal_1_0_thick.xml b/app/src/main/res/drawable/statusbar_signal_1_0_thick.xml index dbe5c6b562..853f6bd9bd 100644 --- a/app/src/main/res/drawable/statusbar_signal_1_0_thick.xml +++ b/app/src/main/res/drawable/statusbar_signal_1_0_thick.xml @@ -1,18 +1,18 @@ - - - - + android:viewportWidth="60" + android:viewportHeight="56" + android:width="60dp" + android:height="56dp"> + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/statusbar_signal_1_0_tint.xml b/app/src/main/res/drawable/statusbar_signal_1_0_tint.xml index b4d28a7769..d3cb8c226c 100644 --- a/app/src/main/res/drawable/statusbar_signal_1_0_tint.xml +++ b/app/src/main/res/drawable/statusbar_signal_1_0_tint.xml @@ -1,18 +1,18 @@ - - - - + android:viewportWidth="60" + android:viewportHeight="56" + android:width="60dp" + android:height="56dp"> + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/statusbar_signal_1_0_tint_thick.xml b/app/src/main/res/drawable/statusbar_signal_1_0_tint_thick.xml index bc97eb432a..b135275dca 100644 --- a/app/src/main/res/drawable/statusbar_signal_1_0_tint_thick.xml +++ b/app/src/main/res/drawable/statusbar_signal_1_0_tint_thick.xml @@ -1,18 +1,18 @@ - - - - + android:viewportWidth="60" + android:viewportHeight="56" + android:width="60dp" + android:height="56dp"> + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/statusbar_signal_1_1.xml b/app/src/main/res/drawable/statusbar_signal_1_1.xml index 4d8656ddb0..d4554eb1dd 100644 --- a/app/src/main/res/drawable/statusbar_signal_1_1.xml +++ b/app/src/main/res/drawable/statusbar_signal_1_1.xml @@ -1,18 +1,18 @@ - - - - + android:viewportWidth="60" + android:viewportHeight="56" + android:width="60dp" + android:height="56dp"> + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/statusbar_signal_1_1_dark.xml b/app/src/main/res/drawable/statusbar_signal_1_1_dark.xml index 7d39d64a5f..0220d7bec7 100644 --- a/app/src/main/res/drawable/statusbar_signal_1_1_dark.xml +++ b/app/src/main/res/drawable/statusbar_signal_1_1_dark.xml @@ -1,18 +1,18 @@ - - - - + android:viewportWidth="60" + android:viewportHeight="56" + android:width="60dp" + android:height="56dp"> + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/statusbar_signal_1_1_dark_thick.xml b/app/src/main/res/drawable/statusbar_signal_1_1_dark_thick.xml index c2bed34f02..ea64c7e6b3 100644 --- a/app/src/main/res/drawable/statusbar_signal_1_1_dark_thick.xml +++ b/app/src/main/res/drawable/statusbar_signal_1_1_dark_thick.xml @@ -1,18 +1,18 @@ - - - - + android:viewportWidth="60" + android:viewportHeight="56" + android:width="60dp" + android:height="56dp"> + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/statusbar_signal_1_1_thick.xml b/app/src/main/res/drawable/statusbar_signal_1_1_thick.xml index 95cdc633ac..a1d4dc1656 100644 --- a/app/src/main/res/drawable/statusbar_signal_1_1_thick.xml +++ b/app/src/main/res/drawable/statusbar_signal_1_1_thick.xml @@ -1,18 +1,18 @@ - - - - + android:viewportWidth="60" + android:viewportHeight="56" + android:width="60dp" + android:height="56dp"> + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/statusbar_signal_1_1_tint.xml b/app/src/main/res/drawable/statusbar_signal_1_1_tint.xml index e097e0c047..79b44919bc 100644 --- a/app/src/main/res/drawable/statusbar_signal_1_1_tint.xml +++ b/app/src/main/res/drawable/statusbar_signal_1_1_tint.xml @@ -1,18 +1,18 @@ - - - - + android:viewportWidth="60" + android:viewportHeight="56" + android:width="60dp" + android:height="56dp"> + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/statusbar_signal_1_1_tint_thick.xml b/app/src/main/res/drawable/statusbar_signal_1_1_tint_thick.xml index 7b16809773..4ac972ad53 100644 --- a/app/src/main/res/drawable/statusbar_signal_1_1_tint_thick.xml +++ b/app/src/main/res/drawable/statusbar_signal_1_1_tint_thick.xml @@ -1,18 +1,18 @@ - - - - + android:viewportWidth="60" + android:viewportHeight="56" + android:width="60dp" + android:height="56dp"> + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/statusbar_signal_1_2.xml b/app/src/main/res/drawable/statusbar_signal_1_2.xml index 7980466bbb..7cd324997e 100644 --- a/app/src/main/res/drawable/statusbar_signal_1_2.xml +++ b/app/src/main/res/drawable/statusbar_signal_1_2.xml @@ -1,18 +1,18 @@ - - - - + android:viewportWidth="60" + android:viewportHeight="56" + android:width="60dp" + android:height="56dp"> + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/statusbar_signal_1_2_dark.xml b/app/src/main/res/drawable/statusbar_signal_1_2_dark.xml index a164ffcfd3..b55ed1a2bf 100644 --- a/app/src/main/res/drawable/statusbar_signal_1_2_dark.xml +++ b/app/src/main/res/drawable/statusbar_signal_1_2_dark.xml @@ -1,18 +1,18 @@ - - - - + android:viewportWidth="60" + android:viewportHeight="56" + android:width="60dp" + android:height="56dp"> + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/statusbar_signal_1_2_dark_thick.xml b/app/src/main/res/drawable/statusbar_signal_1_2_dark_thick.xml index 3ee185ca84..05c4740d02 100644 --- a/app/src/main/res/drawable/statusbar_signal_1_2_dark_thick.xml +++ b/app/src/main/res/drawable/statusbar_signal_1_2_dark_thick.xml @@ -1,18 +1,18 @@ - - - - + android:viewportWidth="60" + android:viewportHeight="56" + android:width="60dp" + android:height="56dp"> + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/statusbar_signal_1_2_thick.xml b/app/src/main/res/drawable/statusbar_signal_1_2_thick.xml index 0e6d8b3d75..808930c76a 100644 --- a/app/src/main/res/drawable/statusbar_signal_1_2_thick.xml +++ b/app/src/main/res/drawable/statusbar_signal_1_2_thick.xml @@ -1,18 +1,18 @@ - - - - + android:viewportWidth="60" + android:viewportHeight="56" + android:width="60dp" + android:height="56dp"> + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/statusbar_signal_1_2_tint.xml b/app/src/main/res/drawable/statusbar_signal_1_2_tint.xml index 5c49350f4d..db29791041 100644 --- a/app/src/main/res/drawable/statusbar_signal_1_2_tint.xml +++ b/app/src/main/res/drawable/statusbar_signal_1_2_tint.xml @@ -1,18 +1,18 @@ - - - - + android:viewportWidth="60" + android:viewportHeight="56" + android:width="60dp" + android:height="56dp"> + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/statusbar_signal_1_2_tint_thick.xml b/app/src/main/res/drawable/statusbar_signal_1_2_tint_thick.xml index 290ebbbe04..d2438e5d6d 100644 --- a/app/src/main/res/drawable/statusbar_signal_1_2_tint_thick.xml +++ b/app/src/main/res/drawable/statusbar_signal_1_2_tint_thick.xml @@ -1,18 +1,18 @@ - - - - + android:viewportWidth="60" + android:viewportHeight="56" + android:width="60dp" + android:height="56dp"> + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/statusbar_signal_1_3.xml b/app/src/main/res/drawable/statusbar_signal_1_3.xml index c0ad52df83..7918001ecc 100644 --- a/app/src/main/res/drawable/statusbar_signal_1_3.xml +++ b/app/src/main/res/drawable/statusbar_signal_1_3.xml @@ -1,18 +1,18 @@ - - - - + android:viewportWidth="60" + android:viewportHeight="56" + android:width="60dp" + android:height="56dp"> + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/statusbar_signal_1_3_dark.xml b/app/src/main/res/drawable/statusbar_signal_1_3_dark.xml index b535075ede..4ac9a4d342 100644 --- a/app/src/main/res/drawable/statusbar_signal_1_3_dark.xml +++ b/app/src/main/res/drawable/statusbar_signal_1_3_dark.xml @@ -1,18 +1,18 @@ - - - - + android:viewportWidth="60" + android:viewportHeight="56" + android:width="60dp" + android:height="56dp"> + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/statusbar_signal_1_3_dark_thick.xml b/app/src/main/res/drawable/statusbar_signal_1_3_dark_thick.xml index 2e8b568164..1d388feb38 100644 --- a/app/src/main/res/drawable/statusbar_signal_1_3_dark_thick.xml +++ b/app/src/main/res/drawable/statusbar_signal_1_3_dark_thick.xml @@ -1,18 +1,18 @@ - - - - + android:viewportWidth="60" + android:viewportHeight="56" + android:width="60dp" + android:height="56dp"> + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/statusbar_signal_1_3_thick.xml b/app/src/main/res/drawable/statusbar_signal_1_3_thick.xml index 7fc666b2d6..4d0bfd6d1d 100644 --- a/app/src/main/res/drawable/statusbar_signal_1_3_thick.xml +++ b/app/src/main/res/drawable/statusbar_signal_1_3_thick.xml @@ -1,18 +1,18 @@ - - - - + android:viewportWidth="60" + android:viewportHeight="56" + android:width="60dp" + android:height="56dp"> + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/statusbar_signal_1_3_tint.xml b/app/src/main/res/drawable/statusbar_signal_1_3_tint.xml index 0f11520aec..1bde06546a 100644 --- a/app/src/main/res/drawable/statusbar_signal_1_3_tint.xml +++ b/app/src/main/res/drawable/statusbar_signal_1_3_tint.xml @@ -1,18 +1,18 @@ - - - - + android:viewportWidth="60" + android:viewportHeight="56" + android:width="60dp" + android:height="56dp"> + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/statusbar_signal_1_3_tint_thick.xml b/app/src/main/res/drawable/statusbar_signal_1_3_tint_thick.xml index 9d593594e7..de9acfd5a1 100644 --- a/app/src/main/res/drawable/statusbar_signal_1_3_tint_thick.xml +++ b/app/src/main/res/drawable/statusbar_signal_1_3_tint_thick.xml @@ -1,18 +1,18 @@ - - - - + android:viewportWidth="60" + android:viewportHeight="56" + android:width="60dp" + android:height="56dp"> + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/statusbar_signal_1_4.xml b/app/src/main/res/drawable/statusbar_signal_1_4.xml index d0733202a8..9f4d8f8eb6 100644 --- a/app/src/main/res/drawable/statusbar_signal_1_4.xml +++ b/app/src/main/res/drawable/statusbar_signal_1_4.xml @@ -1,18 +1,18 @@ - - - - + android:viewportWidth="60" + android:viewportHeight="56" + android:width="60dp" + android:height="56dp"> + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/statusbar_signal_1_4_dark.xml b/app/src/main/res/drawable/statusbar_signal_1_4_dark.xml index e05eb8bd2c..7a2d1bfc9f 100644 --- a/app/src/main/res/drawable/statusbar_signal_1_4_dark.xml +++ b/app/src/main/res/drawable/statusbar_signal_1_4_dark.xml @@ -1,18 +1,18 @@ - - - - + android:viewportWidth="60" + android:viewportHeight="56" + android:width="60dp" + android:height="56dp"> + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/statusbar_signal_1_4_dark_thick.xml b/app/src/main/res/drawable/statusbar_signal_1_4_dark_thick.xml index 271b698678..a0e6f93f4f 100644 --- a/app/src/main/res/drawable/statusbar_signal_1_4_dark_thick.xml +++ b/app/src/main/res/drawable/statusbar_signal_1_4_dark_thick.xml @@ -1,18 +1,18 @@ - - - - + android:viewportWidth="60" + android:viewportHeight="56" + android:width="60dp" + android:height="56dp"> + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/statusbar_signal_1_4_thick.xml b/app/src/main/res/drawable/statusbar_signal_1_4_thick.xml index 28415b6ab4..a003858768 100644 --- a/app/src/main/res/drawable/statusbar_signal_1_4_thick.xml +++ b/app/src/main/res/drawable/statusbar_signal_1_4_thick.xml @@ -1,18 +1,18 @@ - - - - + android:viewportWidth="60" + android:viewportHeight="56" + android:width="60dp" + android:height="56dp"> + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/statusbar_signal_1_4_tint.xml b/app/src/main/res/drawable/statusbar_signal_1_4_tint.xml index 110224101e..75d8ff960e 100644 --- a/app/src/main/res/drawable/statusbar_signal_1_4_tint.xml +++ b/app/src/main/res/drawable/statusbar_signal_1_4_tint.xml @@ -1,18 +1,18 @@ - - - - + android:viewportWidth="60" + android:viewportHeight="56" + android:width="60dp" + android:height="56dp"> + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/statusbar_signal_1_4_tint_thick.xml b/app/src/main/res/drawable/statusbar_signal_1_4_tint_thick.xml index b6f133c658..5052f0834a 100644 --- a/app/src/main/res/drawable/statusbar_signal_1_4_tint_thick.xml +++ b/app/src/main/res/drawable/statusbar_signal_1_4_tint_thick.xml @@ -1,18 +1,18 @@ - - - - + android:viewportWidth="60" + android:viewportHeight="56" + android:width="60dp" + android:height="56dp"> + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/statusbar_signal_1_5.xml b/app/src/main/res/drawable/statusbar_signal_1_5.xml index d0733202a8..9f4d8f8eb6 100644 --- a/app/src/main/res/drawable/statusbar_signal_1_5.xml +++ b/app/src/main/res/drawable/statusbar_signal_1_5.xml @@ -1,18 +1,18 @@ - - - - + android:viewportWidth="60" + android:viewportHeight="56" + android:width="60dp" + android:height="56dp"> + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/statusbar_signal_1_5_dark.xml b/app/src/main/res/drawable/statusbar_signal_1_5_dark.xml index e05eb8bd2c..7a2d1bfc9f 100644 --- a/app/src/main/res/drawable/statusbar_signal_1_5_dark.xml +++ b/app/src/main/res/drawable/statusbar_signal_1_5_dark.xml @@ -1,18 +1,18 @@ - - - - + android:viewportWidth="60" + android:viewportHeight="56" + android:width="60dp" + android:height="56dp"> + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/statusbar_signal_1_5_dark_thick.xml b/app/src/main/res/drawable/statusbar_signal_1_5_dark_thick.xml index 271b698678..a0e6f93f4f 100644 --- a/app/src/main/res/drawable/statusbar_signal_1_5_dark_thick.xml +++ b/app/src/main/res/drawable/statusbar_signal_1_5_dark_thick.xml @@ -1,18 +1,18 @@ - - - - + android:viewportWidth="60" + android:viewportHeight="56" + android:width="60dp" + android:height="56dp"> + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/statusbar_signal_1_5_thick.xml b/app/src/main/res/drawable/statusbar_signal_1_5_thick.xml index 28415b6ab4..a003858768 100644 --- a/app/src/main/res/drawable/statusbar_signal_1_5_thick.xml +++ b/app/src/main/res/drawable/statusbar_signal_1_5_thick.xml @@ -1,18 +1,18 @@ - - - - + android:viewportWidth="60" + android:viewportHeight="56" + android:width="60dp" + android:height="56dp"> + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/statusbar_signal_1_5_tint.xml b/app/src/main/res/drawable/statusbar_signal_1_5_tint.xml index 110224101e..75d8ff960e 100644 --- a/app/src/main/res/drawable/statusbar_signal_1_5_tint.xml +++ b/app/src/main/res/drawable/statusbar_signal_1_5_tint.xml @@ -1,18 +1,18 @@ - - - - + android:viewportWidth="60" + android:viewportHeight="56" + android:width="60dp" + android:height="56dp"> + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/statusbar_signal_1_5_tint_thick.xml b/app/src/main/res/drawable/statusbar_signal_1_5_tint_thick.xml index b6f133c658..5052f0834a 100644 --- a/app/src/main/res/drawable/statusbar_signal_1_5_tint_thick.xml +++ b/app/src/main/res/drawable/statusbar_signal_1_5_tint_thick.xml @@ -1,18 +1,18 @@ - - - - + android:viewportWidth="60" + android:viewportHeight="56" + android:width="60dp" + android:height="56dp"> + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/statusbar_signal_2_0.xml b/app/src/main/res/drawable/statusbar_signal_2_0.xml index 740010f108..6cc0a6933d 100644 --- a/app/src/main/res/drawable/statusbar_signal_2_0.xml +++ b/app/src/main/res/drawable/statusbar_signal_2_0.xml @@ -1,18 +1,18 @@ - - - - - + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/statusbar_signal_2_0_dark.xml b/app/src/main/res/drawable/statusbar_signal_2_0_dark.xml index 3f9c1c8e61..0dbbaac3c3 100644 --- a/app/src/main/res/drawable/statusbar_signal_2_0_dark.xml +++ b/app/src/main/res/drawable/statusbar_signal_2_0_dark.xml @@ -1,18 +1,18 @@ - - - - - + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/statusbar_signal_2_0_dark_thick.xml b/app/src/main/res/drawable/statusbar_signal_2_0_dark_thick.xml index a8c1635925..09fe80cded 100644 --- a/app/src/main/res/drawable/statusbar_signal_2_0_dark_thick.xml +++ b/app/src/main/res/drawable/statusbar_signal_2_0_dark_thick.xml @@ -1,18 +1,18 @@ - - - - - + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/statusbar_signal_2_0_thick.xml b/app/src/main/res/drawable/statusbar_signal_2_0_thick.xml index 9ec7ddd025..6bb3bea56f 100644 --- a/app/src/main/res/drawable/statusbar_signal_2_0_thick.xml +++ b/app/src/main/res/drawable/statusbar_signal_2_0_thick.xml @@ -1,18 +1,18 @@ - - - - - + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/statusbar_signal_2_0_tint.xml b/app/src/main/res/drawable/statusbar_signal_2_0_tint.xml index 9bf0db19f6..50aab63f49 100644 --- a/app/src/main/res/drawable/statusbar_signal_2_0_tint.xml +++ b/app/src/main/res/drawable/statusbar_signal_2_0_tint.xml @@ -1,18 +1,18 @@ - - - - - + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/statusbar_signal_2_0_tint_thick.xml b/app/src/main/res/drawable/statusbar_signal_2_0_tint_thick.xml index 6d74f899cc..842b72360d 100644 --- a/app/src/main/res/drawable/statusbar_signal_2_0_tint_thick.xml +++ b/app/src/main/res/drawable/statusbar_signal_2_0_tint_thick.xml @@ -1,18 +1,18 @@ - - - - - + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/statusbar_signal_2_1.xml b/app/src/main/res/drawable/statusbar_signal_2_1.xml index 87da163665..920da35939 100644 --- a/app/src/main/res/drawable/statusbar_signal_2_1.xml +++ b/app/src/main/res/drawable/statusbar_signal_2_1.xml @@ -1,18 +1,18 @@ - - - - - + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/statusbar_signal_2_1_dark.xml b/app/src/main/res/drawable/statusbar_signal_2_1_dark.xml index 73317dd808..b732533710 100644 --- a/app/src/main/res/drawable/statusbar_signal_2_1_dark.xml +++ b/app/src/main/res/drawable/statusbar_signal_2_1_dark.xml @@ -1,18 +1,18 @@ - - - - - + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/statusbar_signal_2_1_dark_thick.xml b/app/src/main/res/drawable/statusbar_signal_2_1_dark_thick.xml index 110b3718ae..f16f635990 100644 --- a/app/src/main/res/drawable/statusbar_signal_2_1_dark_thick.xml +++ b/app/src/main/res/drawable/statusbar_signal_2_1_dark_thick.xml @@ -1,18 +1,18 @@ - - - - - + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/statusbar_signal_2_1_thick.xml b/app/src/main/res/drawable/statusbar_signal_2_1_thick.xml index 04d3e8d539..1fd7b250da 100644 --- a/app/src/main/res/drawable/statusbar_signal_2_1_thick.xml +++ b/app/src/main/res/drawable/statusbar_signal_2_1_thick.xml @@ -1,18 +1,18 @@ - - - - - + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/statusbar_signal_2_1_tint.xml b/app/src/main/res/drawable/statusbar_signal_2_1_tint.xml index a6c1ef868e..c505bffd28 100644 --- a/app/src/main/res/drawable/statusbar_signal_2_1_tint.xml +++ b/app/src/main/res/drawable/statusbar_signal_2_1_tint.xml @@ -1,18 +1,18 @@ - - - - - + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/statusbar_signal_2_1_tint_thick.xml b/app/src/main/res/drawable/statusbar_signal_2_1_tint_thick.xml index 4b2d412b01..561c2d46f3 100644 --- a/app/src/main/res/drawable/statusbar_signal_2_1_tint_thick.xml +++ b/app/src/main/res/drawable/statusbar_signal_2_1_tint_thick.xml @@ -1,18 +1,18 @@ - - - - - + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/statusbar_signal_2_2.xml b/app/src/main/res/drawable/statusbar_signal_2_2.xml index e3fda7cfa7..4aeecf1383 100644 --- a/app/src/main/res/drawable/statusbar_signal_2_2.xml +++ b/app/src/main/res/drawable/statusbar_signal_2_2.xml @@ -1,18 +1,18 @@ - - - - - + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/statusbar_signal_2_2_dark.xml b/app/src/main/res/drawable/statusbar_signal_2_2_dark.xml index 5c72481ee7..ea5deb4aa0 100644 --- a/app/src/main/res/drawable/statusbar_signal_2_2_dark.xml +++ b/app/src/main/res/drawable/statusbar_signal_2_2_dark.xml @@ -1,18 +1,18 @@ - - - - - + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/statusbar_signal_2_2_dark_thick.xml b/app/src/main/res/drawable/statusbar_signal_2_2_dark_thick.xml index 1891394a34..f316d1536d 100644 --- a/app/src/main/res/drawable/statusbar_signal_2_2_dark_thick.xml +++ b/app/src/main/res/drawable/statusbar_signal_2_2_dark_thick.xml @@ -1,18 +1,18 @@ - - - - - + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/statusbar_signal_2_2_thick.xml b/app/src/main/res/drawable/statusbar_signal_2_2_thick.xml index ff1420a828..1508cdbbc4 100644 --- a/app/src/main/res/drawable/statusbar_signal_2_2_thick.xml +++ b/app/src/main/res/drawable/statusbar_signal_2_2_thick.xml @@ -1,18 +1,18 @@ - - - - - + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/statusbar_signal_2_2_tint.xml b/app/src/main/res/drawable/statusbar_signal_2_2_tint.xml index 5c50041b92..5cb15ffb32 100644 --- a/app/src/main/res/drawable/statusbar_signal_2_2_tint.xml +++ b/app/src/main/res/drawable/statusbar_signal_2_2_tint.xml @@ -1,18 +1,18 @@ - - - - - + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/statusbar_signal_2_2_tint_thick.xml b/app/src/main/res/drawable/statusbar_signal_2_2_tint_thick.xml index 0dfa27d864..8082bbff58 100644 --- a/app/src/main/res/drawable/statusbar_signal_2_2_tint_thick.xml +++ b/app/src/main/res/drawable/statusbar_signal_2_2_tint_thick.xml @@ -1,18 +1,18 @@ - - - - - + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/statusbar_signal_2_3.xml b/app/src/main/res/drawable/statusbar_signal_2_3.xml index 287c23c045..f21f201258 100644 --- a/app/src/main/res/drawable/statusbar_signal_2_3.xml +++ b/app/src/main/res/drawable/statusbar_signal_2_3.xml @@ -1,18 +1,18 @@ - - - - - + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/statusbar_signal_2_3_dark.xml b/app/src/main/res/drawable/statusbar_signal_2_3_dark.xml index d5be22c0b1..943bb83df6 100644 --- a/app/src/main/res/drawable/statusbar_signal_2_3_dark.xml +++ b/app/src/main/res/drawable/statusbar_signal_2_3_dark.xml @@ -1,18 +1,18 @@ - - - - - + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/statusbar_signal_2_3_dark_thick.xml b/app/src/main/res/drawable/statusbar_signal_2_3_dark_thick.xml index cc853dc8bf..60c2cef55c 100644 --- a/app/src/main/res/drawable/statusbar_signal_2_3_dark_thick.xml +++ b/app/src/main/res/drawable/statusbar_signal_2_3_dark_thick.xml @@ -1,18 +1,18 @@ - - - - - + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/statusbar_signal_2_3_thick.xml b/app/src/main/res/drawable/statusbar_signal_2_3_thick.xml index 8c8d39cdc4..afcf91636a 100644 --- a/app/src/main/res/drawable/statusbar_signal_2_3_thick.xml +++ b/app/src/main/res/drawable/statusbar_signal_2_3_thick.xml @@ -1,18 +1,18 @@ - - - - - + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/statusbar_signal_2_3_tint.xml b/app/src/main/res/drawable/statusbar_signal_2_3_tint.xml index 320c0619ae..915471168d 100644 --- a/app/src/main/res/drawable/statusbar_signal_2_3_tint.xml +++ b/app/src/main/res/drawable/statusbar_signal_2_3_tint.xml @@ -1,18 +1,18 @@ - - - - - + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/statusbar_signal_2_3_tint_thick.xml b/app/src/main/res/drawable/statusbar_signal_2_3_tint_thick.xml index 2aa2b3a24e..0d81b32f6f 100644 --- a/app/src/main/res/drawable/statusbar_signal_2_3_tint_thick.xml +++ b/app/src/main/res/drawable/statusbar_signal_2_3_tint_thick.xml @@ -1,18 +1,18 @@ - - - - - + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/statusbar_signal_2_4.xml b/app/src/main/res/drawable/statusbar_signal_2_4.xml index 2dba188e16..2725ae1938 100644 --- a/app/src/main/res/drawable/statusbar_signal_2_4.xml +++ b/app/src/main/res/drawable/statusbar_signal_2_4.xml @@ -1,18 +1,18 @@ - - - - - + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/statusbar_signal_2_4_dark.xml b/app/src/main/res/drawable/statusbar_signal_2_4_dark.xml index c16b8f82eb..bc44053411 100644 --- a/app/src/main/res/drawable/statusbar_signal_2_4_dark.xml +++ b/app/src/main/res/drawable/statusbar_signal_2_4_dark.xml @@ -1,18 +1,18 @@ - - - - - + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/statusbar_signal_2_4_dark_thick.xml b/app/src/main/res/drawable/statusbar_signal_2_4_dark_thick.xml index 44e2ef9ffb..02106e7865 100644 --- a/app/src/main/res/drawable/statusbar_signal_2_4_dark_thick.xml +++ b/app/src/main/res/drawable/statusbar_signal_2_4_dark_thick.xml @@ -1,18 +1,18 @@ - - - - - + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/statusbar_signal_2_4_thick.xml b/app/src/main/res/drawable/statusbar_signal_2_4_thick.xml index 533a843408..4ebc126e13 100644 --- a/app/src/main/res/drawable/statusbar_signal_2_4_thick.xml +++ b/app/src/main/res/drawable/statusbar_signal_2_4_thick.xml @@ -1,18 +1,18 @@ - - - - - + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/statusbar_signal_2_4_tint.xml b/app/src/main/res/drawable/statusbar_signal_2_4_tint.xml index f3b0f18a31..0b97aa20cf 100644 --- a/app/src/main/res/drawable/statusbar_signal_2_4_tint.xml +++ b/app/src/main/res/drawable/statusbar_signal_2_4_tint.xml @@ -1,18 +1,18 @@ - - - - - + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/statusbar_signal_2_4_tint_thick.xml b/app/src/main/res/drawable/statusbar_signal_2_4_tint_thick.xml index cf277010da..906b8170f3 100644 --- a/app/src/main/res/drawable/statusbar_signal_2_4_tint_thick.xml +++ b/app/src/main/res/drawable/statusbar_signal_2_4_tint_thick.xml @@ -1,18 +1,18 @@ - - - - - + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/statusbar_signal_2_5.xml b/app/src/main/res/drawable/statusbar_signal_2_5.xml index 2dba188e16..2725ae1938 100644 --- a/app/src/main/res/drawable/statusbar_signal_2_5.xml +++ b/app/src/main/res/drawable/statusbar_signal_2_5.xml @@ -1,18 +1,18 @@ - - - - - + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/statusbar_signal_2_5_dark.xml b/app/src/main/res/drawable/statusbar_signal_2_5_dark.xml index c16b8f82eb..bc44053411 100644 --- a/app/src/main/res/drawable/statusbar_signal_2_5_dark.xml +++ b/app/src/main/res/drawable/statusbar_signal_2_5_dark.xml @@ -1,18 +1,18 @@ - - - - - + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/statusbar_signal_2_5_dark_thick.xml b/app/src/main/res/drawable/statusbar_signal_2_5_dark_thick.xml index 44e2ef9ffb..02106e7865 100644 --- a/app/src/main/res/drawable/statusbar_signal_2_5_dark_thick.xml +++ b/app/src/main/res/drawable/statusbar_signal_2_5_dark_thick.xml @@ -1,18 +1,18 @@ - - - - - + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/statusbar_signal_2_5_thick.xml b/app/src/main/res/drawable/statusbar_signal_2_5_thick.xml index 533a843408..4ebc126e13 100644 --- a/app/src/main/res/drawable/statusbar_signal_2_5_thick.xml +++ b/app/src/main/res/drawable/statusbar_signal_2_5_thick.xml @@ -1,18 +1,18 @@ - - - - - + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/statusbar_signal_2_5_tint.xml b/app/src/main/res/drawable/statusbar_signal_2_5_tint.xml index f3b0f18a31..0b97aa20cf 100644 --- a/app/src/main/res/drawable/statusbar_signal_2_5_tint.xml +++ b/app/src/main/res/drawable/statusbar_signal_2_5_tint.xml @@ -1,18 +1,18 @@ - - - - - + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/statusbar_signal_2_5_tint_thick.xml b/app/src/main/res/drawable/statusbar_signal_2_5_tint_thick.xml index cf277010da..906b8170f3 100644 --- a/app/src/main/res/drawable/statusbar_signal_2_5_tint_thick.xml +++ b/app/src/main/res/drawable/statusbar_signal_2_5_tint_thick.xml @@ -1,18 +1,18 @@ - - - - - + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/action_bar_layout.xml b/app/src/main/res/layout/action_bar_layout.xml index 26aca6a049..3af000f547 100644 --- a/app/src/main/res/layout/action_bar_layout.xml +++ b/app/src/main/res/layout/action_bar_layout.xml @@ -20,7 +20,7 @@ android:layout_gravity="center|start" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_marginStart="-8dp"/> + android:layout_marginStart="-8dp" /> + android:layout_marginVertical="10dp" /> diff --git a/app/src/main/res/layout/actionbar_layout.xml b/app/src/main/res/layout/actionbar_layout.xml index e8a5af5984..890d00e7ba 100644 --- a/app/src/main/res/layout/actionbar_layout.xml +++ b/app/src/main/res/layout/actionbar_layout.xml @@ -13,7 +13,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginStart="-8dp" - android:layout_alignParentStart="true"/> + android:layout_alignParentStart="true" /> + android:visibility="gone" /> @@ -48,7 +48,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentEnd="true" - android:layout_marginEnd="-8dp"/> + android:layout_marginEnd="-8dp" /> + android:gravity="center" + android:background="#00000000" + android:layout_gravity="center" + android:orientation="vertical" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:paddingVertical="30dp"> + + android:background="@drawable/ic_cemiuiler_settings_v140" + android:layout_width="100dp" + android:layout_height="100dp" /> + + android:textAppearance="@style/TextAppearance.Preference" + android:paddingTop="3dp" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="@string/app_name" /> + + android:textAppearance="@style/TextAppearance.Preference.Secondary" + android:textSize="16sp" + android:id="@android:id/summary" + android:paddingTop="10dp" + android:layout_width="wrap_content" + android:layout_height="wrap_content" /> + + android:textAppearance="@style/TextAppearance.Preference.Secondary" + android:textSize="16sp" + android:id="@android:id/title" + android:paddingTop="10dp" + android:layout_width="wrap_content" + android:layout_height="wrap_content" /> diff --git a/app/src/main/res/layout/activity_custom_hook.xml b/app/src/main/res/layout/activity_custom_hook.xml index c5d0fc2316..7e3a58c82b 100644 --- a/app/src/main/res/layout/activity_custom_hook.xml +++ b/app/src/main/res/layout/activity_custom_hook.xml @@ -6,7 +6,7 @@ + android:layout_height="match_parent"> + android:layout_marginEnd="15dp" /> \ No newline at end of file diff --git a/app/src/main/res/layout/activity_custom_hook_config.xml b/app/src/main/res/layout/activity_custom_hook_config.xml index 709ea27468..293f97140c 100644 --- a/app/src/main/res/layout/activity_custom_hook_config.xml +++ b/app/src/main/res/layout/activity_custom_hook_config.xml @@ -10,7 +10,7 @@ android:layout_gravity="center" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:paddingVertical="10dp"/> + android:paddingVertical="10dp" /> + android:layout_weight="1" /> + android:layout_height="wrap_content" /> diff --git a/app/src/main/res/layout/activity_location.xml b/app/src/main/res/layout/activity_location.xml index a0a2a34cec..dfdf064971 100644 --- a/app/src/main/res/layout/activity_location.xml +++ b/app/src/main/res/layout/activity_location.xml @@ -22,6 +22,6 @@ android:layout_gravity="end|bottom" android:layout_width="68dp" android:layout_height="68dp" - android:layout_margin="20dp"/> + android:layout_margin="20dp" /> diff --git a/app/src/main/res/layout/color_picker_dialog.xml b/app/src/main/res/layout/color_picker_dialog.xml index 66eed8208d..4e014ef048 100644 --- a/app/src/main/res/layout/color_picker_dialog.xml +++ b/app/src/main/res/layout/color_picker_dialog.xml @@ -35,7 +35,7 @@ android:maxLength="7" android:singleLine="true" android:inputType="textCapCharacters" - android:visibility="gone"/> + android:visibility="gone" /> + android:visibility="gone" /> - \ No newline at end of file diff --git a/app/src/main/res/layout/item_app_list.xml b/app/src/main/res/layout/item_app_list.xml index 45b2eb27ee..99e218de4e 100644 --- a/app/src/main/res/layout/item_app_list.xml +++ b/app/src/main/res/layout/item_app_list.xml @@ -36,7 +36,7 @@ android:layout_height="wrap_content" android:layout_gravity="center_vertical" android:singleLine="true" - android:textSize="18sp"/> + android:textSize="18sp" /> + android:visibility="gone" /> + app:visibility_width="300dp" /> + + android:src="@drawable/ic_launcher_foreground" /> \ No newline at end of file diff --git a/app/src/main/res/layout/preference_custom_blur_light_mode.xml b/app/src/main/res/layout/preference_custom_blur_light_mode.xml index fdf2dea0ed..3a6002fc58 100644 --- a/app/src/main/res/layout/preference_custom_blur_light_mode.xml +++ b/app/src/main/res/layout/preference_custom_blur_light_mode.xml @@ -1,10 +1,11 @@ + + android:src="@drawable/ic_launcher_foreground" /> \ No newline at end of file diff --git a/app/src/main/res/layout/preference_round_layout.xml b/app/src/main/res/layout/preference_round_layout.xml index 5ad9f769c1..4258b5fb21 100644 --- a/app/src/main/res/layout/preference_round_layout.xml +++ b/app/src/main/res/layout/preference_round_layout.xml @@ -15,82 +15,82 @@ --> + xmlns:tools="http://schemas.android.com/tools" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_gravity="center_vertical" + android:background="?preferenceItemBackground" + android:clipChildren="false" + android:gravity="center_vertical" + tools:ignore="PrivateResource"> + android:id="@+id/icon_frame" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:minWidth="@dimen/preference_icon_minWidth" + android:paddingTop="@dimen/preference_item_padding_inner" + android:paddingEnd="@dimen/preference_icon_padding_end" + android:paddingBottom="@dimen/preference_item_padding_inner" + tools:ignore="PrivateResource,RtlSymmetry"> + android:id="@android:id/icon" + android:layout_width="60dp" + android:layout_height="60dp" + android:layout_gravity="center" /> + style="@style/Widget.PreferenceItem" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="center_vertical" + android:layout_weight="1" + android:gravity="center_vertical" + tools:ignore="InefficientWeight"> + android:id="@android:id/title" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:ellipsize="end" + android:fadingEdge="horizontal" + android:maxLines="2" + android:textAlignment="viewStart" + android:textAppearance="@style/TextAppearance.Preference" /> + android:id="@android:id/summary" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_below="@android:id/title" + android:layout_alignStart="@android:id/title" + android:layout_marginTop="@dimen/preference_summary_margin_top" + android:textAlignment="viewStart" + android:textAppearance="@style/TextAppearance.Preference.Secondary" + tools:ignore="PrivateResource" /> + android:id="@android:id/widget_frame" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:clipChildren="false" + android:gravity="center" + android:minWidth="@dimen/preference_widget_min_width" + android:orientation="vertical" + tools:ignore="PrivateResource" /> + android:id="@+id/arrow_right" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="center|end" + android:gravity="center" + android:src="@drawable/ic_arrow_right" + tools:ignore="ContentDescription,PrivateResource" /> \ No newline at end of file diff --git a/app/src/main/res/layout/preference_seekbar_ex.xml b/app/src/main/res/layout/preference_seekbar_ex.xml index 8f4a51f960..8929033265 100644 --- a/app/src/main/res/layout/preference_seekbar_ex.xml +++ b/app/src/main/res/layout/preference_seekbar_ex.xml @@ -1,85 +1,95 @@ + android:gravity="center_vertical" + android:layout_gravity="center_vertical" + android:orientation="horizontal" + android:background="?attr/preferenceItemBackground" + android:clipChildren="false" + android:layout_width="match_parent" + android:layout_height="wrap_content"> + + + android:gravity="center_vertical" + android:layout_gravity="center_vertical" + android:orientation="vertical" + android:paddingTop="@dimen/preference_item_padding_vertical" + android:paddingBottom="@dimen/preference_item_padding_vertical" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_weight="1.0"> + + android:layout_width="match_parent" + android:layout_height="wrap_content"> + - + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_weight="1.0"> + - - - + + + android:layout_marginTop="@dimen/preference_summary_margin_top" + android:layout_below="@android:id/title" + android:layout_alignLeft="@android:id/title" + android:textAlignment="viewStart" + android:layout_alignStart="@android:id/title" /> + + + + + + + android:orientation="horizontal" + android:clipChildren="false" + android:clipToPadding="false" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginTop="10dp"> + + android:id="@id/seekbar" + android:background="@null" + android:focusable="false" + android:clickable="false" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_weight="1.0" /> \ No newline at end of file diff --git a/app/src/main/res/layout/preference_seekbar_no_padding.xml b/app/src/main/res/layout/preference_seekbar_no_padding.xml index 1a8324196c..f81843761e 100644 --- a/app/src/main/res/layout/preference_seekbar_no_padding.xml +++ b/app/src/main/res/layout/preference_seekbar_no_padding.xml @@ -1,5 +1,4 @@ - - - - + + android:textAppearance="@style/TextAppearance.Preference.Secondary" /> @@ -74,7 +72,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/ic_arrow_edit" - android:visibility="gone"/> + android:visibility="gone" /> diff --git a/app/src/main/res/layout/statusbar_text_icon.xml b/app/src/main/res/layout/statusbar_text_icon.xml index a2d5737d38..730ae5eefc 100644 --- a/app/src/main/res/layout/statusbar_text_icon.xml +++ b/app/src/main/res/layout/statusbar_text_icon.xml @@ -1,10 +1,9 @@ - + diff --git a/app/src/main/res/menu/menu_location_simulation.xml b/app/src/main/res/menu/menu_location_simulation.xml index 03b1881ae8..5a1cd66c57 100644 --- a/app/src/main/res/menu/menu_location_simulation.xml +++ b/app/src/main/res/menu/menu_location_simulation.xml @@ -2,5 +2,5 @@ + android:title="@string/location_data_title" /> \ No newline at end of file diff --git a/app/src/main/res/menu/menu_main.xml b/app/src/main/res/menu/menu_main.xml index 1f52e2da8b..57a7eb0efd 100644 --- a/app/src/main/res/menu/menu_main.xml +++ b/app/src/main/res/menu/menu_main.xml @@ -3,10 +3,10 @@ + android:title="@string/cemiuiler_restart_quick" /> + android:title="@string/settings" /> \ No newline at end of file diff --git a/app/src/main/res/menu/menu_system_framework_other.xml b/app/src/main/res/menu/menu_system_framework_other.xml index f89f701364..48a9005044 100644 --- a/app/src/main/res/menu/menu_system_framework_other.xml +++ b/app/src/main/res/menu/menu_system_framework_other.xml @@ -4,10 +4,10 @@ + android:title="@string/system_framework_share_menu_test" /> + android:title="@string/system_framework_open_with_menu_test" /> \ No newline at end of file diff --git a/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml index 7353dbd1fd..ac94b34f54 100644 --- a/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml +++ b/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml @@ -1,5 +1,5 @@ - - + + \ No newline at end of file diff --git a/app/src/main/res/values-en-rUS/strings.xml b/app/src/main/res/values-en-rUS/strings.xml index 0b7810fff3..72f721f62b 100644 --- a/app/src/main/res/values-en-rUS/strings.xml +++ b/app/src/main/res/values-en-rUS/strings.xml @@ -850,7 +850,8 @@ Ai Image Engine Unlock Super resolution Unlock AI image enhancement and AI HDR enhancement - Unlock MEMCAdd more frame rate and bitrate selections + Unlock MEMC + Add more frame rate and bitrate selections Please choose according to the hardware situation Other Other diff --git a/app/src/main/res/values-pt-rBR/strings.xml b/app/src/main/res/values-pt-rBR/strings.xml index 82c28f7675..766841b15b 100644 --- a/app/src/main/res/values-pt-rBR/strings.xml +++ b/app/src/main/res/values-pt-rBR/strings.xml @@ -1,998 +1,998 @@ - Sobre - Discussão - Contribuinte - Obrigado aos seguintes colaboradores pela sua ajuda no desenvolvimento do Cemiuiler (em nenhuma ordem particular) - Crowdin - Ajude-nos a traduzir Cemiuiler para o seu idioma - Desenvolvedor - Patrocinador - Você pode nos apoiar doando aqui - Código Fonte - Este projeto é de código aberto baseado na licença AGPL-3.0 - Sítio web oficial - Outros - Canal QQ - Grupo QQ - Canal Telegram - Grupo Telegrama - Tradutor - Citação - Cemiuiler usa alguns ou todos os seguintes projetos de código aberto, graças aos desenvolvedores desses projetos por seu apoio (em nenhuma ordem específica) - AI Reco - Remover restrições beta - Sempre em exibição - Desbloquear o limite de tempo de visualização do ecrã sempre ligado - Diretório APK - Número da versão da aplicação - ID de utilizador - Directório de dados - Lançamento - Versão mínima do SDK - O aplicativo não tem atividade inicializável padrão - Abrir com a app store - Versão do SDK de destino - Cemiuiler - Frequência de Utilização - Tempo de instalação - Nome da aplicação - Classificação por omissão - Armazenagem utilizada - Versão não suportada - Fundo - Centrado - Esquerda - Direito - Top - Ambos - Apenas corrente - Poder somente - Temperatura da bateria - Bold - Defeito - Geek - Fechar - Temperatura da CPU - Defeito - Separado - Actividade de lançamento - Mudar para a aplicação anterior - Limpar memória - Expandir o painel Definições rápidas - Mostrar barra lateral - Janela flutuante - Forçar o encerramento da aplicação actual - Voltar - Inversão de cor - Iniciar aplicação - Seleccionar aplicação - Ecrã de bloqueio - Abrir Menu - Nenhuma acção - Abrir o centro de notificações - Modo Com Uma Mão (Esquerda) - Modo Com Uma Mão (Direita) - Janela de fixação - Abrir o menu alimentação - Menu de alimentação - Abrir Recente - Captura De Ecrã - Desloque - se para o topo - Iniciar atalho - Fechar ecrã - Teclado Do Interruptor - Função de alternância - Abrir janela de volume - Volume Para Baixo - Aumentar O Volume - Lento - Branco Shogi peça virou branco Shogi peça (preto Shogi peça virou Preto Shogi peça ) - Sem ícones - Arco-íris - Acompanhe o assunto - Você quer escrever backups? - Falha na cópia de segurança - Agora você tem que habilitar manualmente as permissões para esta opção. - Sucesso do Backup - Navegador - Opções do desenvolvedor - Chamada - Câmara - Desbloquear marca d\'água AI - Desbloquear longa exposição - Desbloquear o modo Clone - Desbloquear Espelho de Bolso - Desbloquear o modo Documento - Desbloquear câmera dupla - Duração Do Desbloqueio - Desbloquear Câmera de filme - Desbloquear longa exp - Desbloquear Dolly zoom - Desbloquear Sonho - Desbloquear obturador lento - Destrave o back-flow do tempo - Desbloquear congelamento de tempo - Desbloquear o modo de cartão de identificação - Desbloquear vídeos curtos - Desbloquear o Modo Super-Lua - Desbloquear o modo Panorama - Desbloquear o modo Pixel - Desbloquear o modo retrato - Desbloquear câmera lenta - Desbloquear vídeo-sky - Desbloquear Vlog - Desbloquear Vlog Pro - Desbloquear Master-lens - Não pode funcionar bem em algum dispositivo - Desbloquear nova beleza - Só produz efeitos quando utiliza a câmara frontal - Pro - Desbloquear registo - Desbloquear RAW - Desbloquear 120FPS - Suporte apenas quando as qualidades 4K, certifique - se de que o seu dispositivo foi suportado - Desbloquear 60FPS - Não disponível em algumas qualidades, certifique - se de que o seu dispositivo foi suportado - Desbloquear ia melhorar - Desbloquear Zoom de áudio - Desbloquear HDR - Desbloquear HEIF - Ativar opções de laboratório - Desbloquear ajustar efeitos de maquiagem para homens - Desbloquear remover moles - Desbloquear captura de movimento - Desbloquear os olhos da pista - Desbloquear o foco da Faixa De Movimento - Desbloquear Cor melhorar - Destrave o obturador da palma - Desbloquear Maquiagem - Só produz efeitos quando utiliza a câmara frontal - Puxe para baixo a barra de status para exibir Interruptores de atalho e notificações do sistema - Reinicie rapidamente a aplicação de destino - Ritmo - Aura - Desactivar + Sobre + Discussão + Contribuinte + Obrigado aos seguintes colaboradores pela sua ajuda no desenvolvimento do Cemiuiler (em nenhuma ordem particular) + Crowdin + Ajude-nos a traduzir Cemiuiler para o seu idioma + Desenvolvedor + Patrocinador + Você pode nos apoiar doando aqui + Código Fonte + Este projeto é de código aberto baseado na licença AGPL-3.0 + Sítio web oficial + Outros + Canal QQ + Grupo QQ + Canal Telegram + Grupo Telegrama + Tradutor + Citação + Cemiuiler usa alguns ou todos os seguintes projetos de código aberto, graças aos desenvolvedores desses projetos por seu apoio (em nenhuma ordem específica) + AI Reco + Remover restrições beta + Sempre em exibição + Desbloquear o limite de tempo de visualização do ecrã sempre ligado + Diretório APK + Número da versão da aplicação + ID de utilizador + Directório de dados + Lançamento + Versão mínima do SDK + O aplicativo não tem atividade inicializável padrão + Abrir com a app store + Versão do SDK de destino + Cemiuiler + Frequência de Utilização + Tempo de instalação + Nome da aplicação + Classificação por omissão + Armazenagem utilizada + Versão não suportada + Fundo + Centrado + Esquerda + Direito + Top + Ambos + Apenas corrente + Poder somente + Temperatura da bateria + Bold + Defeito + Geek + Fechar + Temperatura da CPU + Defeito + Separado + Actividade de lançamento + Mudar para a aplicação anterior + Limpar memória + Expandir o painel Definições rápidas + Mostrar barra lateral + Janela flutuante + Forçar o encerramento da aplicação actual + Voltar + Inversão de cor + Iniciar aplicação + Seleccionar aplicação + Ecrã de bloqueio + Abrir Menu + Nenhuma acção + Abrir o centro de notificações + Modo Com Uma Mão (Esquerda) + Modo Com Uma Mão (Direita) + Janela de fixação + Abrir o menu alimentação + Menu de alimentação + Abrir Recente + Captura De Ecrã + Desloque - se para o topo + Iniciar atalho + Fechar ecrã + Teclado Do Interruptor + Função de alternância + Abrir janela de volume + Volume Para Baixo + Aumentar O Volume + Lento + Branco Shogi peça virou branco Shogi peça (preto Shogi peça virou Preto Shogi peça ) + Sem ícones + Arco-íris + Acompanhe o assunto + Você quer escrever backups? + Falha na cópia de segurança + Agora você tem que habilitar manualmente as permissões para esta opção. + Sucesso do Backup + Navegador + Opções do desenvolvedor + Chamada + Câmara + Desbloquear marca d\'água AI + Desbloquear longa exposição + Desbloquear o modo Clone + Desbloquear Espelho de Bolso + Desbloquear o modo Documento + Desbloquear câmera dupla + Duração Do Desbloqueio + Desbloquear Câmera de filme + Desbloquear longa exp + Desbloquear Dolly zoom + Desbloquear Sonho + Desbloquear obturador lento + Destrave o back-flow do tempo + Desbloquear congelamento de tempo + Desbloquear o modo de cartão de identificação + Desbloquear vídeos curtos + Desbloquear o Modo Super-Lua + Desbloquear o modo Panorama + Desbloquear o modo Pixel + Desbloquear o modo retrato + Desbloquear câmera lenta + Desbloquear vídeo-sky + Desbloquear Vlog + Desbloquear Vlog Pro + Desbloquear Master-lens + Não pode funcionar bem em algum dispositivo + Desbloquear nova beleza + Só produz efeitos quando utiliza a câmara frontal + Pro + Desbloquear registo + Desbloquear RAW + Desbloquear 120FPS + Suporte apenas quando as qualidades 4K, certifique - se de que o seu dispositivo foi suportado + Desbloquear 60FPS + Não disponível em algumas qualidades, certifique - se de que o seu dispositivo foi suportado + Desbloquear ia melhorar + Desbloquear Zoom de áudio + Desbloquear HDR + Desbloquear HEIF + Ativar opções de laboratório + Desbloquear ajustar efeitos de maquiagem para homens + Desbloquear remover moles + Desbloquear captura de movimento + Desbloquear os olhos da pista + Desbloquear o foco da Faixa De Movimento + Desbloquear Cor melhorar + Destrave o obturador da palma + Desbloquear Maquiagem + Só produz efeitos quando utiliza a câmara frontal + Puxe para baixo a barra de status para exibir Interruptores de atalho e notificações do sistema + Reinicie rapidamente a aplicação de destino + Ritmo + Aura + Desactivar Streamer - Área de transferência - Relógio - Desbloquear o Relógio Ampulheta animação - Versão 13.65.0 e acima não são suportados - Fold - Sempre dobrado - Expandir - Sempre expandir - Taplus - Usar Navegador de terceiros - Faça Taplus não é obrigatório usar o navegador MIUI para pesquisa, você precisa escolher o navegador padrão por si mesmo - Gesto: 2 dedos - Como abrir o link - Escolha um navegador para abrir o link - Qualidade das imagens salvas: super resolução - A verdadeira preservação requer apoio subjacente do modelo do dispositivo - Desfoque de fundo - Raio desfocado - Cor de fundo - transparência da cor de fundo - Fundo cantos arredondados - Desfoque de fundo - Personalizado - Modo de selecção - Adicionar gancho - Media - Anel - Notificação - Fundo - Centrado - Falha ao alterar o estado do aplicativo - É uma má ideia! - Se este for um aplicativo do sistema necessário, desativá-lo pode causar danos - Tem certeza de que deseja desativar o aplicativo? - Desativar registo detalhado - Reiniciar para aplicar - Baixar programa de gestão - Editor - Activar - Função - Explorador De Arquivos Pode Selecionável - Explorador De Arquivos É Uma Única Linha - Gestor De Ficheiros - Forma livre - Janela flutuante de notificação - Galeria - Destrave o alcance dinâmico alto da exposição - Desbloquear ID - Desbloquear Corte - Desbloquear Céu - Desbloquear OCR - Desbloquear tabela de digitalização - Desbloquear gerar PDF - Desbloquear Clip - Desbloquear Apagar - Desbloquear texto fogos de artifício - Desbloquear Editor De Vídeo - Desbloquear efeitos de vídeo - Componentes de segurança MIUI - Impedir o carregamento automático da lista de aplicações instaladas - Lançador do sistema - Feche a pasta do aplicativo após o lançamento - Desligamento Automático - Fundo XXL personalizado - Fundo Vertical de três grades personalizado - Personalizado - Fundo Horizontal de três grades personalizado - Personalizado - Personalizado - Altura do fundo - Altura do fundo - Altura do fundo - Largura do fundo - Largura do fundo - Largura do fundo - Pasta Grande - Pasta Grande - Raio do desfoque - Doca - Desfoque de fundo - Ativar a personalização - Altura - Altura da doca - Margem inferior - Margem da doca a partir da parte inferior do ecrã - Margem Vertical - Distância da doca de ambos os lados da tela - Margem superior - Margem da doca a partir do indicador do ecrã - Doca da dobra - Ocultar seekpoint - Distância do ícone da margem inferior - Margem inferior do ícone - Distância do ícone da doca da margem inferior do ecrã - Mostrar o título do ícone no dock - Indicador da margem da página na parte inferior do ecrã - Remover a restrição do número do ícone do dock - Gaveta - Ocultar \"todos\" na gaveta de aplicativos - Ativar Todos Os Aplicativos Container View Blur - Defina a transparência do plano de fundo da gaveta do aplicativo para 100%para usar esse recurso - Ocultar o botão \"Editar\" na paginação do app Drawer - Iniciar desfoque - Pasta - Velocidade de abertura 1 - Velocidade aberta 2 - Velocidade de Fecho 1 - Velocidade de Fecho 2 - Animação de rebote - Desfoque de fundo - %d lista - Número de pastas - Apenas No Meio - Intensidade Da Cor - Fundo inteiro - Melhorar ou enfraquecer a cor de fundo - Cor de sobreposição - Reduzir margens - Espaçamento horizontal da pasta - Use a largura da pasta inteira - Gesto - Duplo clique - Toque duas vezes em qualquer lugar na tela inicial - Deslize Para Baixo - Deslize para baixo com dois dedos - Deslize para baixo com dois dedos em qualquer tela inicial - Deslize para baixo com um dedo em qualquer ecrã inicial - Gesto em ecrã inteiro - Deslizar Para A Esquerda - Deslize para a esquerda na base do ecrã inicial - Ecrã principal - Escolha uma aplicação - Nenhum - Belisque com dois dedos - Deslize Para A Direita - Deslize para a direita na base do ecrã inicial - Shake - Agitar o dispositivo a partir de qualquer ecrã inicial - Espalhe com dois dedos - Deslize Para Cima - Deslize para cima com dois dedos - Deslize para cima com dois dedos em qualquer ecrã inicial - Deslize para cima com um dedo em qualquer ecrã inicial - Ícones grandes com cantos arredondados - Disposição - Ecrã inicial - Altura - Margem inferior - Distância da doca da margem inferior da tela - Margem superior - Distância da doca da margem do indicador da página - Doca - Margem inferior - Distância da barra de pesquisa da margem inferior do ecrã - Barra de pesquisa - Desbloquear layout - Desbloquear limite de tamanho do layout do ícone da tela inicial - Desbloquear layout (sem modo word) - Desbloquear limite de tamanho do layout do ícone da tela inicial - Margem inferior - Distância do ecrã inicial da margem inferior do ecrã - Modo escuro - Modo de luz - Outros - Sempre desfocar o papel de parede do iniciador - Gestão de atalhos do ambiente de trabalho - Raio Do Desfoque - Desativar ocultar Google - Corrigir um problema de compatibilidade que fez com que a área de trabalho ficasse preta - Modo de forma livre - Adicionar menu de forma livre ao menu de atalho - Reconhecimento obrigatório como modelo high-end - Modo Desktop - Utilizar a cor monet - Cor de fundo do ícone - Rolagem infinita - Saltar da última página para a primeira página e vice-versa - Prioridade Perfeita Do Ícone - Ecrã vertical oposto - Indicador da página - Desfoque de fundo para o menu de atalho - Valor do desfoque do menu de atalho - Remover restrições aos atalhos - Tempo da exposição - A página onde o widget de relógio está localizado sempre exibe a hora - Editar cor - Otimize a animação de desbloqueio - Sua cor - Recentes - Velocidade da animação - Cartão de visualização da tarefa de distância do nome do aplicativo - Nível de desfocagem - Desfoque Completo - Complete Blur Plus - Desativar o escurecimento do papel de parede - Cor de fundo do cartão do aplicativo Freeform - Botão Ocultar limpeza - Ocultar botão de forma livre - Ocultar a barra de Estado na vista de Tarefas - Tamanho da miniatura para Horizontal-Vertical - Tamanho da miniatura para Horizontal-Horizontal - Modificar o anim para remoção de cartões - Nenhum Desfoque - Nenhum Desfoque (Anim Simples) - Remover ícone - Mostrar memória real - Borrão Simples - Tarefa ver Cartão cantos arredondados - Borrão De Ensaio - Texto exibido quando nenhuma tarefa recente - Cor do texto das etiquetas em miniatura - Tamanho do texto das etiquetas em miniatura - Tamanho da miniatura para verticalmente - Fundo Do Ícone - Fundo personalizado - Tamanho do fundo - Pasta Pequena - Ícone e título - Velocidade da animação - Ícone médio canto redondo seguir - Grande ícone - Baixar animação - Animação de interrupção otimizada - Tamanho da fonte - Ícone - Cor do título - Rolagem de texto - Título - Antecedentes - Desfoque de fundo - Widget - Animação do Widget - Permitir que o widget clássico seja movido para a tela menos um - Widget cantos arredondados - Ocultar título do widget - Mostrar widgets MIUI - Exibir widgets MIUI na página do widget do Android - Módulo não activado - Telefone - Esconder personalizado colorido anel de volta tom - Joyose - Controlo Da Nuvem - Desativar o controlo da nuvem - Programação de desempenho - Após a abertura, adicione as configurações relacionadas à GPU do jogo no meio inferior de [espaço de jogo] - Espaço De Jogo - Português - Permissões - Ler a área de transferência - Leia a área de transferência usando dicas de torradas - Oculte a caixa de diálogo e permita que o aplicativo leia a área de transferência por padrão - Ocultar prompt de notificação - Defeito do sistema - Navegador Xiaomi - Adicionar - Personalizado - Base de dados - Apagar - GPS - Localização - Selecionar localização - Endereço Mac - Rede - Carrier Masquerade fix - Nomes dos pacotes - Endereço MAC Do Router - WIFI - Estação Base - Longitude e latitude - Compensação - Mark - Título - GetApps - Modelo guise - Modelo de dispositivo disfarçado é Xiaomi 13 Ultra - Proibir o uso de ícones de terceiros - Torne a área de trabalho mais limpa - Editor Da Galeria - Desbloquear o Gestor de filtros - Desbloquear o limite mínimo de imagem de corte - Elenco - Desbloquear interconexão do dispositivo - MIUI+ - Desbloquear MIUI+ - Mi Share - Desactivar o fecho automático do Mi Share - Mostrar mais informações da embalagem - Mostrar mais informações sobre a aplicação que está a ser instalada - Desativar verificação de aplicativos instalados com frequência - Desativar promoção - Desactivar a detecção de riscos - Fonte de instalação personalizada - Purificar a página - Modo de limpeza - Desativar o aviso de segurança - Remover as restrições de instalação da aplicação do sistema - Permitir que qualquer canal que não seja do sistema instale aplicações do sistema - Papel de parede - Desbloquear super papel de parede - Mensagem - Desativar anúncios - Remover atalhos na parte inferior do ecrã e promoções abaixo do conteúdo SMS - BTT - Ignorar a autenticação MTB - Este é um recurso de alto risco, quaisquer problemas decorrentes disso serão suportados pelo usuário, por favor, tenha cuidado para fazer backup de sua banda base. Digite * # * # MODEMTEST#* # * na interface de discagem para abrir as configurações de MTB - Música - Remover anúncios - Notificação - Todos - Áudio - Documento - Vídeo - Imagem - Ficheiro - Método 1 - Método 2 (recomendado) - Não reparar - Instalador do pacote - App vault - Modelo de desfoque do assistente pessoal - Valor do desfoque do assistente pessoal - Cor do assistente pessoal - Peso da almofada / dobra - Activar os widgets do estilo Pad / Fold - Estilo da dobra da tela do negativo um - Patch do Widget - Serviço Telefónico - Uso de cartão DUPLO 5G (SA + NSA) - O cartão SIM principal e secundário habilita o 5G ao mesmo tempo (o cartão SIM secundário suporta apenas a NSA) - Utilização de cartão DUPLO SA (SA + SA) - Características experimentais. Tornar o cartão SIM secundário compatível com SA - Banda N1 - Faixa do apoio N1 (NR) - Banda N28 - Suporte N28 banda (NR) - Banda N5/N8 - Digite * # * # 65686633#* # * na interface de discagem para suportar a banda N5/n8. Se mostrar ativar o modo N5 e N8, o recurso será ativado com êxito. - Desbloquear Smart dual SIM - Desbloquear Vice slot volte - Utilizar dados móveis durante chamadas VoLTE no SIM secundário - Retrato - Bateria e desempenho - Aplicativos personalizados de alta taxa de atualização - Tente não matar aplicativos - Pode aumentar o consumo de energia - Bloquear FPS máximo - Recomendar - Registo - Depois de redefinir a configuração do módulo, todos os seus dados serão excluídos! - A configuração do módulo foi redefinida - Tem certeza de que deseja redefinir? - Deseja recuperar o seu backup? - Falha na recuperação - Agora você tem que habilitar manualmente as permissões para esta opção. - Recuperação bem sucedida - Recuperar - Tem certeza de que deseja reiniciar agora - \? - Reiniciar a IU do sistema - Tem certeza de que deseja reiniciar a IU do sistema agora? - Scanner - Desbloquear cartão de identificação de digitalização - Desbloquear ficheiros de verificação - Desbloquear documento digitalizado - Desbloquear tabela de digitalização - Desbloquear OCR - Desbloquear digitalização PPT - Desbloquear tradução - Gravador De Ecrã - Adicionar mais seleções de taxa de quadros e taxa de bits - Por favor escolher de acordo com a situação de hardware - Forçar a ativação do suporte de gravação de ecrã ASOP - Requer suporte à versão de gravação de tela - Desbloquear mais Volume de - Alguma versão não suporta - Imagem - Desbloquear o limite mínimo de imagem de corte + Área de transferência + Relógio + Desbloquear o Relógio Ampulheta animação + Versão 13.65.0 e acima não são suportados + Fold + Sempre dobrado + Expandir + Sempre expandir + Taplus + Usar Navegador de terceiros + Faça Taplus não é obrigatório usar o navegador MIUI para pesquisa, você precisa escolher o navegador padrão por si mesmo + Gesto: 2 dedos + Como abrir o link + Escolha um navegador para abrir o link + Qualidade das imagens salvas: super resolução + A verdadeira preservação requer apoio subjacente do modelo do dispositivo + Desfoque de fundo + Raio desfocado + Cor de fundo + transparência da cor de fundo + Fundo cantos arredondados + Desfoque de fundo + Personalizado + Modo de selecção + Adicionar gancho + Media + Anel + Notificação + Fundo + Centrado + Falha ao alterar o estado do aplicativo + É uma má ideia! + Se este for um aplicativo do sistema necessário, desativá-lo pode causar danos + Tem certeza de que deseja desativar o aplicativo? + Desativar registo detalhado + Reiniciar para aplicar + Baixar programa de gestão + Editor + Activar + Função + Explorador De Arquivos Pode Selecionável + Explorador De Arquivos É Uma Única Linha + Gestor De Ficheiros + Forma livre + Janela flutuante de notificação + Galeria + Destrave o alcance dinâmico alto da exposição + Desbloquear ID + Desbloquear Corte + Desbloquear Céu + Desbloquear OCR + Desbloquear tabela de digitalização + Desbloquear gerar PDF + Desbloquear Clip + Desbloquear Apagar + Desbloquear texto fogos de artifício + Desbloquear Editor De Vídeo + Desbloquear efeitos de vídeo + Componentes de segurança MIUI + Impedir o carregamento automático da lista de aplicações instaladas + Lançador do sistema + Feche a pasta do aplicativo após o lançamento + Desligamento Automático + Fundo XXL personalizado + Fundo Vertical de três grades personalizado + Personalizado + Fundo Horizontal de três grades personalizado + Personalizado + Personalizado + Altura do fundo + Altura do fundo + Altura do fundo + Largura do fundo + Largura do fundo + Largura do fundo + Pasta Grande + Pasta Grande + Raio do desfoque + Doca + Desfoque de fundo + Ativar a personalização + Altura + Altura da doca + Margem inferior + Margem da doca a partir da parte inferior do ecrã + Margem Vertical + Distância da doca de ambos os lados da tela + Margem superior + Margem da doca a partir do indicador do ecrã + Doca da dobra + Ocultar seekpoint + Distância do ícone da margem inferior + Margem inferior do ícone + Distância do ícone da doca da margem inferior do ecrã + Mostrar o título do ícone no dock + Indicador da margem da página na parte inferior do ecrã + Remover a restrição do número do ícone do dock + Gaveta + Ocultar \"todos\" na gaveta de aplicativos + Ativar Todos Os Aplicativos Container View Blur + Defina a transparência do plano de fundo da gaveta do aplicativo para 100%para usar esse recurso + Ocultar o botão \"Editar\" na paginação do app Drawer + Iniciar desfoque + Pasta + Velocidade de abertura 1 + Velocidade aberta 2 + Velocidade de Fecho 1 + Velocidade de Fecho 2 + Animação de rebote + Desfoque de fundo + %d lista + Número de pastas + Apenas No Meio + Intensidade Da Cor + Fundo inteiro + Melhorar ou enfraquecer a cor de fundo + Cor de sobreposição + Reduzir margens + Espaçamento horizontal da pasta + Use a largura da pasta inteira + Gesto + Duplo clique + Toque duas vezes em qualquer lugar na tela inicial + Deslize Para Baixo + Deslize para baixo com dois dedos + Deslize para baixo com dois dedos em qualquer tela inicial + Deslize para baixo com um dedo em qualquer ecrã inicial + Gesto em ecrã inteiro + Deslizar Para A Esquerda + Deslize para a esquerda na base do ecrã inicial + Ecrã principal + Escolha uma aplicação + Nenhum + Belisque com dois dedos + Deslize Para A Direita + Deslize para a direita na base do ecrã inicial + Shake + Agitar o dispositivo a partir de qualquer ecrã inicial + Espalhe com dois dedos + Deslize Para Cima + Deslize para cima com dois dedos + Deslize para cima com dois dedos em qualquer ecrã inicial + Deslize para cima com um dedo em qualquer ecrã inicial + Ícones grandes com cantos arredondados + Disposição + Ecrã inicial + Altura + Margem inferior + Distância da doca da margem inferior da tela + Margem superior + Distância da doca da margem do indicador da página + Doca + Margem inferior + Distância da barra de pesquisa da margem inferior do ecrã + Barra de pesquisa + Desbloquear layout + Desbloquear limite de tamanho do layout do ícone da tela inicial + Desbloquear layout (sem modo word) + Desbloquear limite de tamanho do layout do ícone da tela inicial + Margem inferior + Distância do ecrã inicial da margem inferior do ecrã + Modo escuro + Modo de luz + Outros + Sempre desfocar o papel de parede do iniciador + Gestão de atalhos do ambiente de trabalho + Raio Do Desfoque + Desativar ocultar Google + Corrigir um problema de compatibilidade que fez com que a área de trabalho ficasse preta + Modo de forma livre + Adicionar menu de forma livre ao menu de atalho + Reconhecimento obrigatório como modelo high-end + Modo Desktop + Utilizar a cor monet + Cor de fundo do ícone + Rolagem infinita + Saltar da última página para a primeira página e vice-versa + Prioridade Perfeita Do Ícone + Ecrã vertical oposto + Indicador da página + Desfoque de fundo para o menu de atalho + Valor do desfoque do menu de atalho + Remover restrições aos atalhos + Tempo da exposição + A página onde o widget de relógio está localizado sempre exibe a hora + Editar cor + Otimize a animação de desbloqueio + Sua cor + Recentes + Velocidade da animação + Cartão de visualização da tarefa de distância do nome do aplicativo + Nível de desfocagem + Desfoque Completo + Complete Blur Plus + Desativar o escurecimento do papel de parede + Cor de fundo do cartão do aplicativo Freeform + Botão Ocultar limpeza + Ocultar botão de forma livre + Ocultar a barra de Estado na vista de Tarefas + Tamanho da miniatura para Horizontal-Vertical + Tamanho da miniatura para Horizontal-Horizontal + Modificar o anim para remoção de cartões + Nenhum Desfoque + Nenhum Desfoque (Anim Simples) + Remover ícone + Mostrar memória real + Borrão Simples + Tarefa ver Cartão cantos arredondados + Borrão De Ensaio + Texto exibido quando nenhuma tarefa recente + Cor do texto das etiquetas em miniatura + Tamanho do texto das etiquetas em miniatura + Tamanho da miniatura para verticalmente + Fundo Do Ícone + Fundo personalizado + Tamanho do fundo + Pasta Pequena + Ícone e título + Velocidade da animação + Ícone médio canto redondo seguir + Grande ícone + Baixar animação + Animação de interrupção otimizada + Tamanho da fonte + Ícone + Cor do título + Rolagem de texto + Título + Antecedentes + Desfoque de fundo + Widget + Animação do Widget + Permitir que o widget clássico seja movido para a tela menos um + Widget cantos arredondados + Ocultar título do widget + Mostrar widgets MIUI + Exibir widgets MIUI na página do widget do Android + Módulo não activado + Telefone + Esconder personalizado colorido anel de volta tom + Joyose + Controlo Da Nuvem + Desativar o controlo da nuvem + Programação de desempenho + Após a abertura, adicione as configurações relacionadas à GPU do jogo no meio inferior de [espaço de jogo] + Espaço De Jogo + Português + Permissões + Ler a área de transferência + Leia a área de transferência usando dicas de torradas + Oculte a caixa de diálogo e permita que o aplicativo leia a área de transferência por padrão + Ocultar prompt de notificação + Defeito do sistema + Navegador Xiaomi + Adicionar + Personalizado + Base de dados + Apagar + GPS + Localização + Selecionar localização + Endereço Mac + Rede + Carrier Masquerade fix + Nomes dos pacotes + Endereço MAC Do Router + WIFI + Estação Base + Longitude e latitude + Compensação + Mark + Título + GetApps + Modelo guise + Modelo de dispositivo disfarçado é Xiaomi 13 Ultra + Proibir o uso de ícones de terceiros + Torne a área de trabalho mais limpa + Editor Da Galeria + Desbloquear o Gestor de filtros + Desbloquear o limite mínimo de imagem de corte + Elenco + Desbloquear interconexão do dispositivo + MIUI+ + Desbloquear MIUI+ + Mi Share + Desactivar o fecho automático do Mi Share + Mostrar mais informações da embalagem + Mostrar mais informações sobre a aplicação que está a ser instalada + Desativar verificação de aplicativos instalados com frequência + Desativar promoção + Desactivar a detecção de riscos + Fonte de instalação personalizada + Purificar a página + Modo de limpeza + Desativar o aviso de segurança + Remover as restrições de instalação da aplicação do sistema + Permitir que qualquer canal que não seja do sistema instale aplicações do sistema + Papel de parede + Desbloquear super papel de parede + Mensagem + Desativar anúncios + Remover atalhos na parte inferior do ecrã e promoções abaixo do conteúdo SMS + BTT + Ignorar a autenticação MTB + Este é um recurso de alto risco, quaisquer problemas decorrentes disso serão suportados pelo usuário, por favor, tenha cuidado para fazer backup de sua banda base. Digite * # * # MODEMTEST#* # * na interface de discagem para abrir as configurações de MTB + Música + Remover anúncios + Notificação + Todos + Áudio + Documento + Vídeo + Imagem + Ficheiro + Método 1 + Método 2 (recomendado) + Não reparar + Instalador do pacote + App vault + Modelo de desfoque do assistente pessoal + Valor do desfoque do assistente pessoal + Cor do assistente pessoal + Peso da almofada / dobra + Activar os widgets do estilo Pad / Fold + Estilo da dobra da tela do negativo um + Patch do Widget + Serviço Telefónico + Uso de cartão DUPLO 5G (SA + NSA) + O cartão SIM principal e secundário habilita o 5G ao mesmo tempo (o cartão SIM secundário suporta apenas a NSA) + Utilização de cartão DUPLO SA (SA + SA) + Características experimentais. Tornar o cartão SIM secundário compatível com SA + Banda N1 + Faixa do apoio N1 (NR) + Banda N28 + Suporte N28 banda (NR) + Banda N5/N8 + Digite * # * # 65686633#* # * na interface de discagem para suportar a banda N5/n8. Se mostrar ativar o modo N5 e N8, o recurso será ativado com êxito. + Desbloquear Smart dual SIM + Desbloquear Vice slot volte + Utilizar dados móveis durante chamadas VoLTE no SIM secundário + Retrato + Bateria e desempenho + Aplicativos personalizados de alta taxa de atualização + Tente não matar aplicativos + Pode aumentar o consumo de energia + Bloquear FPS máximo + Recomendar + Registo + Depois de redefinir a configuração do módulo, todos os seus dados serão excluídos! + A configuração do módulo foi redefinida + Tem certeza de que deseja redefinir? + Deseja recuperar o seu backup? + Falha na recuperação + Agora você tem que habilitar manualmente as permissões para esta opção. + Recuperação bem sucedida + Recuperar + Tem certeza de que deseja reiniciar agora + \? + Reiniciar a IU do sistema + Tem certeza de que deseja reiniciar a IU do sistema agora? + Scanner + Desbloquear cartão de identificação de digitalização + Desbloquear ficheiros de verificação + Desbloquear documento digitalizado + Desbloquear tabela de digitalização + Desbloquear OCR + Desbloquear digitalização PPT + Desbloquear tradução + Gravador De Ecrã + Adicionar mais seleções de taxa de quadros e taxa de bits + Por favor escolher de acordo com a situação de hardware + Forçar a ativação do suporte de gravação de ecrã ASOP + Requer suporte à versão de gravação de tela + Desbloquear mais Volume de + Alguma versão não suporta + Imagem + Desbloquear o limite mínimo de imagem de corte Segurança - Modificar a classificação predefinida da lista de gestão de aplicações - Classificação da lista de gestão de aplicações - Adicionar novos campos à aplicação na página:\n- código da versão\n- caminho completo para apk\n- caminho dos dados\n- ID de utilizador\n- versão mínima do SDK\n- versão do SDK de destino\n- link para a página da Play Store\n- iniciar uma aplicação - Mostrar detalhes adicionais da aplicação - Segurança - Proteger a área de transferência - Gestão de aplicações - Applock fora de ordem PIN - Alterar aleatoriamente a sequência do teclado do PIN de bloqueio da aplicação - Poupança de bateria e bateria - Desbloquear embelezar para chamadas de vídeo - Desbloquear o brilho da luz de preenchimento - Desbloquear ajustar o brilho da luz de preenchimento automaticamente - Desbloquear manter rostos centrados - Desbloquear Câmera Privacidade - Assistente de câmara frontal - Menor precisão de posicionamento - Modelo de desfoque da barra lateral - Valor do desfoque da barra lateral - Bolha e forma livre - Cor da barra lateral - Botão Remover relatório - Desativar a detecção de raiz - Gerir a aplicação para obter o número de telemóvel e iniciar sessão com um clique - Desfoque de fundo - Margem Vertical - Margem Horizontal - Barra lateral desfocada - Activar personalizado - Barra lateral - Permissões necessárias não concedidas - Outros - Protecção da privacidade - Remova as restrições do aplicativo de notificação de bolhas - Remover a lista negra de combinação automática - Remover o popup da aplicação aberta - Remover o pop-up de início da cadeia\" permitir que XXX abra XXX\" - Mostrar a temperatura da bateria - Barra lateral Cor da linha personalizada - Barra lateral Cor da linha escuro - Cor da linha da barra lateral predefinida - Luz de cor da linha da barra lateral - Pular limite de contagem regressiva - Desbloquear super carga sem fio - Desbloquear lado-esconder forma livre - Desbloqueie a forma livre de ocultação lateral para dispositivos com suporte humilde, mas restritos. Isso também afetará o comportamento do widget quando o telefone for cortado em segundo plano - Permitir a desativação de qualquer aplicativo da página de informações do aplicativo - Aplicação controlo estatal - Permite a configuração da poupança de energia e o acesso a Wi-Fi para aplicações do sistema - Limite total - Desativar a otimização da verificação de integridade - Bloqueie 100 pontos e desative a otimização - Mostrado apenas no modo de edição - Mostrar apenas ao deslizar o ecrã - Definições - Configurações do módulo de Backup - Resolução de problemas - Cópia de segurança e Restauro - Depurar - Ícones Do Ambiente De Trabalho - Ícones Das Definições - Definir a localização da entrada do módulo nas definições do sistema - Desactivar - Fundo - Médio - Estilo do entalhe do fundo - Estilo Retângulo arredondado - Estilo do ícone - Top - Mostrar importância da notificação - Reinicie a aplicação de destino - Repor as definições do módulo - Restaurar as definições do módulo - Modo de segurança - Função do módulo de paragem - Compartilhar com aplicativos de terceiros - Mi Smart Hub - Tiro - Marcar novo módulo - Reiniciar - Tem certeza de que deseja reiniciar agora? - Defeito - Sempre escondido - Ocultar apenas quando não estiver ligado - Mostrar sempre - Mostrar apenas antes de tocar - Comutador de rede 5G - Rede 5G - Colunas - %d lista - Transparência do fundo do cartão - Linhas - linhas %d - Remover título - Quadro Do Sistema - Permitir a desinstalação de algumas aplicações pré-instaladas - Este recurso é perigoso - Permitir toque não confiável - Notificação de bolhas - Candidaturas seleccionadas - O aplicativo selecionado não aparecerá no menu Abrir com - Limpar o menu aberto com - Candidaturas seleccionadas - O aplicativo selecionado não aparecerá no menu Compartilhar - Limpar menu Partilhar - Desativar verificação do resumo - Permite instalar aplicativos após modificar o arquivo no apk (ignorar erro de resumo inválido) - Desativar a comparação de assinaturas - Permitir a reinstalação da aplicação com diferentes assinaturas - Permitir downgrade - Permitir o downgrade de aplicações - Modo avançado - Passar alguma validação na aplicação - Utilizar assinaturas instaladas - Este recurso é extremamente perigoso e só deve ser ativado quando absolutamente necessário - Serviço De Gestor De Pacotes - Ajustar o volume por defeito - Desativar verificação do link do aplicativo - Reverter para abrir aplicativos suportados diretamente ao abrir links sem habilitar links suportados nas configurações do aplicativo - Forçar a autorização de pequenas formas livres - Ignorar a lista negra do sistema e a proibição de software freeform - Forma livre de bolhas - Suporta apenas ligações - Forma livre múltipla - Abrir com freeform quando Saltar para outra aplicação - Transforme toda a forma livre em mini forma livre - Transforme todos os freeform em mini freeform em tarefas recentes\nEsta característica é uma característica experimental com alta instabilidade - Lembrar estado - Nos cenários a seguir, quando você precisar pular para outros aplicativos, usará a forma livre para abrir - Abrir com menu teste - Desativar matar aplicativos em segundo plano - Características experimentais, podem causar a utilização anormal da memória em execução - Instalação Rápida - Instalar na memória em execução para acelerar a instalação - Outros - Animações de transição usam estilos nativos - Definições da banda - Definições de rede - Rede - Esta característica é uma característica experimental com alta instabilidade - Partilhar menu teste - Remova as restrições de segurança de alto volume - Ajuste instantâneo do volume - Nível do volume dos meios - Pode fazer com que a rolagem da barra de volume congele ou o volume do Bluetooth seja anormal - Controlo independente do volume - Controle deslizante de volume de notificação - Multiplicador do nível de Volume - Volume - Remover a notificação do ecrã superior - Remover a notificação \"Este aplicativo está sendo exibido em cima de outros aplicativos na tela\" - Permitir captura de ecrã - Permite capturas de ecrã e gravações de ecrã de qualquer aplicação - Definições - Atalhos por gestos - Ai Image Engine - Desbloquear o aprimoramento de imagem AI e o aprimoramento AI HDR - Desbloquear MEMC - Desbloquear super resolução - Desbloquear captura de ecrã da área - Modo extremo - A entrada não será exibida após a abertura em modelos não suportados - Opções do desenvolvedor - Versão Internacional das definições - Destrave funções relacionadas da junta - Características experimentais\nReinicie após ativar as configurações, escopo das configurações de entrada\nAtualmente, apenas desbloqueia a interface da interface do Usuário - Funções em destaque - Permissões de nível superior sem procurar na lista de aplicações - Restaure o comportamento antigo, pule diretamente para a chave de permissão do aplicativo correspondente \"exibido em cima de outros aplicativos\" - Autorização - Instalar permissões de aplicações desconhecidas sem procurar na lista de aplicações - Use a compilação internacional, pule diretamente para a chave de permissão do aplicativo correspondente \"exibido em cima de outros aplicativos\" - Ver as suas palavras-passe Wi-Fi guardadas - Desbloquear Gerenciar redes salvas\nCaminho: Configurações-WLAN - Configurações Avançadas-Gerenciar redes salvas - Assistente VoIP - Detalhes do WiFi - Palavra-passe - Verificar - IU do sistema - Outros - Estilo de animação de carregamento - Selecione o estilo de animação de carregamento da tela de bloqueio - Animação de carga - Auto escala do brilho - Definir valores mínimos e máximos para o brilho automático - Desfocar o valor do fundo - Raio Do Desfoque - Brilho - Controle o valor do desfoque de fundo do detalhe - Raio Do Canto - Valor de fundo predefinido - Ocultar A Entrada Do MiPlay - Auto Brilho Máximo - Brilho Automático Min - Silenciar quando o ecrã Está ligado - Quando o ecrã é ligado, a notificação pop-up não reproduz o som de aviso - Modelo De Desfoque De Notificação - Notificação - Mostrar tempo - Mostrar cidade - Cartão - Painel de controlo dos suportes de correcção - Magnet - Centro de controlo - Exposição relacionada - Desfocar a câmara e o botão do ecrã inteligente - Corrente - Apoiar tema padrão só - Toque duas vezes no ecrã de bloqueio - Toque duas vezes num local vazio para bloquear o ecrã - Ocultar Câmara - Ocultar ecrã inteligente - Não há necessidade de digitar a senha ao inicializar - Ele só terá efeito se o dispositivo não estiver habilitado para criptografia - Pin Aleatório - Ordem aleatória do teclado PIN - Mostrar informações de carregamento na parte inferior da tela de bloqueio - Relógio mostrar segundo - Segurança - Ecrã de bloqueio - IU - Personalizar a cor do tema - Escolha a cor do tema - Personalize as cores do tema em vez de extrair cores do papel de parede do sistema - Monet - Navegação personalizada - Altura de navegação - Altura da navegação da paisagem - Altura do quadro de navegação - Altura do quadro da navegação da paisagem - Linha feita sob encomenda do punho - Cor quando Luz-Modo - Cor quando escuro-Modo - Altura - Espessura - Largura do retrato - Largura da paisagem - Linha do punho - Navegação - Puxe para baixo a barra de notificação de mais aplicativos para abrir uma forma livre - As notificações do Mi Push podem não ser suportadas - Notificação - Animação de carregamento nativo - Desativar lista de permissões de notificação - Outros - Plugin da interface do utilizador do sistema - Ativar desfoque da barra de volume - Guia de troca rápida - Despertador - Ocultar indicador de carga - Ocultar o ícone da bateria - Alinhar verticalmente - Transparência - Centrado - Cor - Cor completa da bateria - Cor da bateria fraca - Cor de carregamento - Modo de poupança de energia Cor - Brilho - Altura - Limitar a visibilidade - Baixo nível da bateria - Margem Horizontal - Cantos arredondados - Ensaio - Indicador da bateria - Ocultar percentagem da bateria - Ocultar o sinal de percentagem da bateria - Ícone De Tipo De Rede Grande - Altura da barra de status - Tamanho dos ícones da barra de status - Desativar barra de status com protetor de teclado + Modificar a classificação predefinida da lista de gestão de aplicações + Classificação da lista de gestão de aplicações + Adicionar novos campos à aplicação na página:\n- código da versão\n- caminho completo para apk\n- caminho dos dados\n- ID de utilizador\n- versão mínima do SDK\n- versão do SDK de destino\n- link para a página da Play Store\n- iniciar uma aplicação + Mostrar detalhes adicionais da aplicação + Segurança + Proteger a área de transferência + Gestão de aplicações + Applock fora de ordem PIN + Alterar aleatoriamente a sequência do teclado do PIN de bloqueio da aplicação + Poupança de bateria e bateria + Desbloquear embelezar para chamadas de vídeo + Desbloquear o brilho da luz de preenchimento + Desbloquear ajustar o brilho da luz de preenchimento automaticamente + Desbloquear manter rostos centrados + Desbloquear Câmera Privacidade + Assistente de câmara frontal + Menor precisão de posicionamento + Modelo de desfoque da barra lateral + Valor do desfoque da barra lateral + Bolha e forma livre + Cor da barra lateral + Botão Remover relatório + Desativar a detecção de raiz + Gerir a aplicação para obter o número de telemóvel e iniciar sessão com um clique + Desfoque de fundo + Margem Vertical + Margem Horizontal + Barra lateral desfocada + Activar personalizado + Barra lateral + Permissões necessárias não concedidas + Outros + Protecção da privacidade + Remova as restrições do aplicativo de notificação de bolhas + Remover a lista negra de combinação automática + Remover o popup da aplicação aberta + Remover o pop-up de início da cadeia\" permitir que XXX abra XXX\" + Mostrar a temperatura da bateria + Barra lateral Cor da linha personalizada + Barra lateral Cor da linha escuro + Cor da linha da barra lateral predefinida + Luz de cor da linha da barra lateral + Pular limite de contagem regressiva + Desbloquear super carga sem fio + Desbloquear lado-esconder forma livre + Desbloqueie a forma livre de ocultação lateral para dispositivos com suporte humilde, mas restritos. Isso também afetará o comportamento do widget quando o telefone for cortado em segundo plano + Permitir a desativação de qualquer aplicativo da página de informações do aplicativo + Aplicação controlo estatal + Permite a configuração da poupança de energia e o acesso a Wi-Fi para aplicações do sistema + Limite total + Desativar a otimização da verificação de integridade + Bloqueie 100 pontos e desative a otimização + Mostrado apenas no modo de edição + Mostrar apenas ao deslizar o ecrã + Definições + Configurações do módulo de Backup + Resolução de problemas + Cópia de segurança e Restauro + Depurar + Ícones Do Ambiente De Trabalho + Ícones Das Definições + Definir a localização da entrada do módulo nas definições do sistema + Desactivar + Fundo + Médio + Estilo do entalhe do fundo + Estilo Retângulo arredondado + Estilo do ícone + Top + Mostrar importância da notificação + Reinicie a aplicação de destino + Repor as definições do módulo + Restaurar as definições do módulo + Modo de segurança + Função do módulo de paragem + Compartilhar com aplicativos de terceiros + Mi Smart Hub + Tiro + Marcar novo módulo + Reiniciar + Tem certeza de que deseja reiniciar agora? + Defeito + Sempre escondido + Ocultar apenas quando não estiver ligado + Mostrar sempre + Mostrar apenas antes de tocar + Comutador de rede 5G + Rede 5G + Colunas + %d lista + Transparência do fundo do cartão + Linhas + linhas %d + Remover título + Quadro Do Sistema + Permitir a desinstalação de algumas aplicações pré-instaladas + Este recurso é perigoso + Permitir toque não confiável + Notificação de bolhas + Candidaturas seleccionadas + O aplicativo selecionado não aparecerá no menu Abrir com + Limpar o menu aberto com + Candidaturas seleccionadas + O aplicativo selecionado não aparecerá no menu Compartilhar + Limpar menu Partilhar + Desativar verificação do resumo + Permite instalar aplicativos após modificar o arquivo no apk (ignorar erro de resumo inválido) + Desativar a comparação de assinaturas + Permitir a reinstalação da aplicação com diferentes assinaturas + Permitir downgrade + Permitir o downgrade de aplicações + Modo avançado + Passar alguma validação na aplicação + Utilizar assinaturas instaladas + Este recurso é extremamente perigoso e só deve ser ativado quando absolutamente necessário + Serviço De Gestor De Pacotes + Ajustar o volume por defeito + Desativar verificação do link do aplicativo + Reverter para abrir aplicativos suportados diretamente ao abrir links sem habilitar links suportados nas configurações do aplicativo + Forçar a autorização de pequenas formas livres + Ignorar a lista negra do sistema e a proibição de software freeform + Forma livre de bolhas + Suporta apenas ligações + Forma livre múltipla + Abrir com freeform quando Saltar para outra aplicação + Transforme toda a forma livre em mini forma livre + Transforme todos os freeform em mini freeform em tarefas recentes\nEsta característica é uma característica experimental com alta instabilidade + Lembrar estado + Nos cenários a seguir, quando você precisar pular para outros aplicativos, usará a forma livre para abrir + Abrir com menu teste + Desativar matar aplicativos em segundo plano + Características experimentais, podem causar a utilização anormal da memória em execução + Instalação Rápida + Instalar na memória em execução para acelerar a instalação + Outros + Animações de transição usam estilos nativos + Definições da banda + Definições de rede + Rede + Esta característica é uma característica experimental com alta instabilidade + Partilhar menu teste + Remova as restrições de segurança de alto volume + Ajuste instantâneo do volume + Nível do volume dos meios + Pode fazer com que a rolagem da barra de volume congele ou o volume do Bluetooth seja anormal + Controlo independente do volume + Controle deslizante de volume de notificação + Multiplicador do nível de Volume + Volume + Remover a notificação do ecrã superior + Remover a notificação \"Este aplicativo está sendo exibido em cima de outros aplicativos na tela\" + Permitir captura de ecrã + Permite capturas de ecrã e gravações de ecrã de qualquer aplicação + Definições + Atalhos por gestos + Ai Image Engine + Desbloquear o aprimoramento de imagem AI e o aprimoramento AI HDR + Desbloquear MEMC + Desbloquear super resolução + Desbloquear captura de ecrã da área + Modo extremo + A entrada não será exibida após a abertura em modelos não suportados + Opções do desenvolvedor + Versão Internacional das definições + Destrave funções relacionadas da junta + Características experimentais\nReinicie após ativar as configurações, escopo das configurações de entrada\nAtualmente, apenas desbloqueia a interface da interface do Usuário + Funções em destaque + Permissões de nível superior sem procurar na lista de aplicações + Restaure o comportamento antigo, pule diretamente para a chave de permissão do aplicativo correspondente \"exibido em cima de outros aplicativos\" + Autorização + Instalar permissões de aplicações desconhecidas sem procurar na lista de aplicações + Use a compilação internacional, pule diretamente para a chave de permissão do aplicativo correspondente \"exibido em cima de outros aplicativos\" + Ver as suas palavras-passe Wi-Fi guardadas + Desbloquear Gerenciar redes salvas\nCaminho: Configurações-WLAN - Configurações Avançadas-Gerenciar redes salvas + Assistente VoIP + Detalhes do WiFi + Palavra-passe + Verificar + IU do sistema + Outros + Estilo de animação de carregamento + Selecione o estilo de animação de carregamento da tela de bloqueio + Animação de carga + Auto escala do brilho + Definir valores mínimos e máximos para o brilho automático + Desfocar o valor do fundo + Raio Do Desfoque + Brilho + Controle o valor do desfoque de fundo do detalhe + Raio Do Canto + Valor de fundo predefinido + Ocultar A Entrada Do MiPlay + Auto Brilho Máximo + Brilho Automático Min + Silenciar quando o ecrã Está ligado + Quando o ecrã é ligado, a notificação pop-up não reproduz o som de aviso + Modelo De Desfoque De Notificação + Notificação + Mostrar tempo + Mostrar cidade + Cartão + Painel de controlo dos suportes de correcção + Magnet + Centro de controlo + Exposição relacionada + Desfocar a câmara e o botão do ecrã inteligente + Corrente + Apoiar tema padrão só + Toque duas vezes no ecrã de bloqueio + Toque duas vezes num local vazio para bloquear o ecrã + Ocultar Câmara + Ocultar ecrã inteligente + Não há necessidade de digitar a senha ao inicializar + Ele só terá efeito se o dispositivo não estiver habilitado para criptografia + Pin Aleatório + Ordem aleatória do teclado PIN + Mostrar informações de carregamento na parte inferior da tela de bloqueio + Relógio mostrar segundo + Segurança + Ecrã de bloqueio + IU + Personalizar a cor do tema + Escolha a cor do tema + Personalize as cores do tema em vez de extrair cores do papel de parede do sistema + Monet + Navegação personalizada + Altura de navegação + Altura da navegação da paisagem + Altura do quadro de navegação + Altura do quadro da navegação da paisagem + Linha feita sob encomenda do punho + Cor quando Luz-Modo + Cor quando escuro-Modo + Altura + Espessura + Largura do retrato + Largura da paisagem + Linha do punho + Navegação + Puxe para baixo a barra de notificação de mais aplicativos para abrir uma forma livre + As notificações do Mi Push podem não ser suportadas + Notificação + Animação de carregamento nativo + Desativar lista de permissões de notificação + Outros + Plugin da interface do utilizador do sistema + Ativar desfoque da barra de volume + Guia de troca rápida + Despertador + Ocultar indicador de carga + Ocultar o ícone da bateria + Alinhar verticalmente + Transparência + Centrado + Cor + Cor completa da bateria + Cor da bateria fraca + Cor de carregamento + Modo de poupança de energia Cor + Brilho + Altura + Limitar a visibilidade + Baixo nível da bateria + Margem Horizontal + Cantos arredondados + Ensaio + Indicador da bateria + Ocultar percentagem da bateria + Ocultar o sinal de percentagem da bateria + Ícone De Tipo De Rede Grande + Altura da barra de status + Tamanho dos ícones da barra de status + Desativar barra de status com protetor de teclado Toque duas vezes para dormir - Ocultar a barra de status ao fazer uma captura de tela - Modo avião - Despertador - Mostrar o ícone do alarme apenas antes de o alarme disparar - %d horas - Grande ícone HD - Bluetooth - Bateria Bluetooth - Auriculares - Hotspot - Localização - Cartão SIM 1 ícone de sinal - Ícone de sinal do cartão SIM 2 - Nenhum ícone do cartão SIM - Lógica de exibição - Novo ícone HD - NFC - Pequeno ícone HD - Volume - VPN - Wi-Fi - Indicador De Actividade Da Rede - Slave Wi-Fi - Wi-Fi standard - Zen - Rede Móvel - Texto personalizado - Exibição do ícone do tipo de rede móvel separadamente - Ícone do tipo de rede móvel - Velocidade da Internet - NFC - A linha vertical entre o tempo e a velocidade da internet não é apresentada em dispositivos com câmara centralizada - Separador de velocidade da rede - Número máximo de pontos de notificação - Número máximo de ícones de notificação - Trocar Wi-Fi e Rede Móvel - Forçar a utilização do novo ícone HD - É necessária uma versão recente do sistema, alguns modelos podem não ter sido atualizados - Cena sonora - Wi-Fi - Modo não perturbe - Ocultar unidades - A corrente mostra sempre um valor positivo - Exibição de linha única - Mostrar apenas ao carregar - Ordem inversa - Mostrar à direita - Mostrar conteúdo - Tamanho da fonte - Intervalo de actualização de Estado - Dia do espectáculo - Exemplo do formato do relógio - Mostrar duplo + Ocultar a barra de status ao fazer uma captura de tela + Modo avião + Despertador + Mostrar o ícone do alarme apenas antes de o alarme disparar + %d horas + Grande ícone HD + Bluetooth + Bateria Bluetooth + Auriculares + Hotspot + Localização + Cartão SIM 1 ícone de sinal + Ícone de sinal do cartão SIM 2 + Nenhum ícone do cartão SIM + Lógica de exibição + Novo ícone HD + NFC + Pequeno ícone HD + Volume + VPN + Wi-Fi + Indicador De Actividade Da Rede + Slave Wi-Fi + Wi-Fi standard + Zen + Rede Móvel + Texto personalizado + Exibição do ícone do tipo de rede móvel separadamente + Ícone do tipo de rede móvel + Velocidade da Internet + NFC + A linha vertical entre o tempo e a velocidade da internet não é apresentada em dispositivos com câmara centralizada + Separador de velocidade da rede + Número máximo de pontos de notificação + Número máximo de ícones de notificação + Trocar Wi-Fi e Rede Móvel + Forçar a utilização do novo ícone HD + É necessária uma versão recente do sistema, alguns modelos podem não ter sido atualizados + Cena sonora + Wi-Fi + Modo não perturbe + Ocultar unidades + A corrente mostra sempre um valor positivo + Exibição de linha única + Mostrar apenas ao carregar + Ordem inversa + Mostrar à direita + Mostrar conteúdo + Tamanho da fonte + Intervalo de actualização de Estado + Dia do espectáculo + Exemplo do formato do relógio + Mostrar duplo Tamanho dobro do pulso de disparo da fileira - Formato do relógio - Esconder espaço - Mostrar hora dupla - Modo de relógio personalizado - Mostrar mês - Mostrar período do relógio - Mostrar segundos - Tamanho do relógio - Gestão do indicador de relógio - Semana do espectáculo - Mostrar ano - Indicadores de Hardware - Bateria - Bluetooth - O lado esquerdo do ícone mostra - Localização - Escala de ícones - Estilos de ícones - Barra de sinal de Fila Dupla - Rede móvel - Ícone De Notificação - O lado direito do ícone mostra - Ícone De Estado - Gestão de ícones - Wi-Fi - Alinhamento Horizontal - Energia relacionada - Bold - Defeito - Expandir - Corrigir largura do conteúdo - Para evitar jitter horizontal - Margem esquerda - Margem direita - Temperatura relacionada - Deslocamento para cima e para baixo - Bold - Tamanho da fonte - B / s - A velocidade de Upload e download é exibida em linhas duplas - Mostrar as velocidades de entrada e saída da rede separadamente - Activar personalizado - O valor e a unidade são apresentados em linhas duplas - Velocidade da rede Tamanho da fonte - %d KB / s - %d m - %d em - %d s - Ocultar velocidade de rede lenta - O indicador deixa de ser apresentado quando a velocidade da rede é baixa - Nível de velocidade da rede lento - Os valores de velocidade da rede abaixo deste nível são considerados lentos e será apresentado um ícone de indicador diferente (apenas alguns ícones) - Ícone indicador - Gestão do indicador de velocidade da rede - %s lux - 1 KB / s - Ocultar sufixo (/s)de Byte por segundo - Mostrar para cima e para baixo a velocidade da rede - Intervalo de actualização da velocidade da rede - Corrigir a temperatura da CPU - Introduzir o número de / sys / devices / virtual / thermal / thermal_zone* - Barra De Estado - Temporizador alargado - Sistema - Temas - Patch do tema - Desativar anúncios - Ativar tema de dobra - Activar o tema do bloco - Desativar a detecção da versão MIUI - Dica - Kire - https://github.com/LKHZV - Cartões inteligentes - Gerir o NFC automaticamente - O NFC é ativado automaticamente ao entrar na página de passagem do cartão e é desligado automaticamente ao sair - Falha ao ativar o NFC automaticamente - Ativar o NFC manualmente - Ligar o NFC automaticamente…… - Ilimitado - Atualizador - Dispositivo falso para atualizador - Este recurso é realmente perigoso, por favor, não o use diariamente - Remover a verificação OTA - Apenas dispositivos VAB são suportados, por favor, não habilite outros dispositivos que não sejam VAB!\n- Você pode deslizar para o pacote swiping cartão de teste interno completo sem permissões de teste interno\n- Recomenda-se limpar os dados após piscar em diferentes tipos de versão\n- Não suporta qualquer uso ROM não oficial\n- Esta função é perigosa, por favor, avalie se deve habilitá-la depois de entender o funcionamento do Fastboot - Versão MIUI falsa para atualizador - Apenas modifique a atualização do sistema, o que pode proteger a atualização do sistema até certo ponto - Outros - Transparência da máscara de fundo - Cor de fundo - Fundo cantos arredondados - Raio desfocado - Título MIUI - Ajustar o título da barra superior nas aplicações MIUI - Localização da janela pop-up - Janela pop-up para a margem inferior - A distância entre a janela pop-up e a parte inferior do ecrã - Janela pop-up Para margem vertical - A distância entre a janela pop-up e os lados do ecrã - Diálogo - Desfoque da janela - Raio do desfoque da janela - Borrão - Diálogo de pedido de ignorar registos do dispositivo de acesso - Impedir que o bluetooth seja desligado temporariamente - Remover o limite de pastas indisponíveis - Criação de blocos de .pasta xlDownload - Impedir a geração do Gestor de transferências .pasta xlDownload na raiz do armazenamento interno - Apoio SDK - Código da versão - Nome da versão - Tamanho - Tarefa 1 - Tarefa 2 - Tarefa 3 - Universal - Localização falsa - Desativar rejeição fora dos limites - Desbloquear IME - Após a abertura, verifique o escopo do método de entrada correspondente no lsposed manager - Meteorologia - Nível De Animação - Alta - Baixo - Médio - Faça MIUI ótimo novamente! + Formato do relógio + Esconder espaço + Mostrar hora dupla + Modo de relógio personalizado + Mostrar mês + Mostrar período do relógio + Mostrar segundos + Tamanho do relógio + Gestão do indicador de relógio + Semana do espectáculo + Mostrar ano + Indicadores de Hardware + Bateria + Bluetooth + O lado esquerdo do ícone mostra + Localização + Escala de ícones + Estilos de ícones + Barra de sinal de Fila Dupla + Rede móvel + Ícone De Notificação + O lado direito do ícone mostra + Ícone De Estado + Gestão de ícones + Wi-Fi + Alinhamento Horizontal + Energia relacionada + Bold + Defeito + Expandir + Corrigir largura do conteúdo + Para evitar jitter horizontal + Margem esquerda + Margem direita + Temperatura relacionada + Deslocamento para cima e para baixo + Bold + Tamanho da fonte + B / s + A velocidade de Upload e download é exibida em linhas duplas + Mostrar as velocidades de entrada e saída da rede separadamente + Activar personalizado + O valor e a unidade são apresentados em linhas duplas + Velocidade da rede Tamanho da fonte + %d KB / s + %d m + %d em + %d s + Ocultar velocidade de rede lenta + O indicador deixa de ser apresentado quando a velocidade da rede é baixa + Nível de velocidade da rede lento + Os valores de velocidade da rede abaixo deste nível são considerados lentos e será apresentado um ícone de indicador diferente (apenas alguns ícones) + Ícone indicador + Gestão do indicador de velocidade da rede + %s lux + 1 KB / s + Ocultar sufixo (/s)de Byte por segundo + Mostrar para cima e para baixo a velocidade da rede + Intervalo de actualização da velocidade da rede + Corrigir a temperatura da CPU + Introduzir o número de / sys / devices / virtual / thermal / thermal_zone* + Barra De Estado + Temporizador alargado + Sistema + Temas + Patch do tema + Desativar anúncios + Ativar tema de dobra + Activar o tema do bloco + Desativar a detecção da versão MIUI + Dica + Kire + https://github.com/LKHZV + Cartões inteligentes + Gerir o NFC automaticamente + O NFC é ativado automaticamente ao entrar na página de passagem do cartão e é desligado automaticamente ao sair + Falha ao ativar o NFC automaticamente + Ativar o NFC manualmente + Ligar o NFC automaticamente…… + Ilimitado + Atualizador + Dispositivo falso para atualizador + Este recurso é realmente perigoso, por favor, não o use diariamente + Remover a verificação OTA + Apenas dispositivos VAB são suportados, por favor, não habilite outros dispositivos que não sejam VAB!\n- Você pode deslizar para o pacote swiping cartão de teste interno completo sem permissões de teste interno\n- Recomenda-se limpar os dados após piscar em diferentes tipos de versão\n- Não suporta qualquer uso ROM não oficial\n- Esta função é perigosa, por favor, avalie se deve habilitá-la depois de entender o funcionamento do Fastboot + Versão MIUI falsa para atualizador + Apenas modifique a atualização do sistema, o que pode proteger a atualização do sistema até certo ponto + Outros + Transparência da máscara de fundo + Cor de fundo + Fundo cantos arredondados + Raio desfocado + Título MIUI + Ajustar o título da barra superior nas aplicações MIUI + Localização da janela pop-up + Janela pop-up para a margem inferior + A distância entre a janela pop-up e a parte inferior do ecrã + Janela pop-up Para margem vertical + A distância entre a janela pop-up e os lados do ecrã + Diálogo + Desfoque da janela + Raio do desfoque da janela + Borrão + Diálogo de pedido de ignorar registos do dispositivo de acesso + Impedir que o bluetooth seja desligado temporariamente + Remover o limite de pastas indisponíveis + Criação de blocos de .pasta xlDownload + Impedir a geração do Gestor de transferências .pasta xlDownload na raiz do armazenamento interno + Apoio SDK + Código da versão + Nome da versão + Tamanho + Tarefa 1 + Tarefa 2 + Tarefa 3 + Universal + Localização falsa + Desativar rejeição fora dos limites + Desbloquear IME + Após a abertura, verifique o escopo do método de entrada correspondente no lsposed manager + Meteorologia + Nível De Animação + Alta + Baixo + Médio + Faça MIUI ótimo novamente! Novo centro de controle - Centro de controle legado - Azulejo retângulo arredondado - A orientação de paisagem terá uma coluna adicional - Número de colunas no painel recolhido - A orientação de paisagem terá uma coluna adicional\nSe a sua ROM tiver uma opção compacta de layout de Configurações rápidas, ela adicionará outra coluna em ambas as orientações - Os rótulos ficarão ocultos por 5 linhas na orientação retrato. O número de linhas é limitado a 3 com rótulos ocultos na orientação paisagem + Centro de controle legado + Azulejo retângulo arredondado + A orientação de paisagem terá uma coluna adicional + Número de colunas no painel recolhido + A orientação de paisagem terá uma coluna adicional\nSe a sua ROM tiver uma opção compacta de layout de Configurações rápidas, ela adicionará outra coluna em ambas as orientações + Os rótulos ficarão ocultos por 5 linhas na orientação retrato. O número de linhas é limitado a 3 com rótulos ocultos na orientação paisagem procurar Notificações compactas Reduzir os preenchimentos verticais das notificações diff --git a/app/src/main/res/values-tr/strings.xml b/app/src/main/res/values-tr/strings.xml index e4aa1fe526..c9b63b12a9 100644 --- a/app/src/main/res/values-tr/strings.xml +++ b/app/src/main/res/values-tr/strings.xml @@ -766,7 +766,7 @@ Yeni güzelliğin kilidini aç Yalnızca ön kamerayı kullanırken etkili olur Ana lensin kilidini aç - Bazı cihazlarda iyi çalışmayabilir + Bazı cihazlarda iyi çalışmayabilir RAW\'ın kilidini aç Günlüğün kilidini aç İzin diff --git a/app/src/main/res/values-vi/strings.xml b/app/src/main/res/values-vi/strings.xml index 8fef0ff6fb..87791abec7 100644 --- a/app/src/main/res/values-vi/strings.xml +++ b/app/src/main/res/values-vi/strings.xml @@ -1,32 +1,32 @@ - + Giới thiệu Thảo luận Người đóng góp @@ -116,13 +116,13 @@ Trình duyệt Tùy chọn nhà phát triển 17.5.xxxxx trở lên không được hỗ trợ - + Cuộc gọi Máy ảnh Mở khóa hình mờ AI @@ -182,8 +182,8 @@ Streamer Đồng hồ Mở khóa hoạt ảnh đồng hồ hẹn giờ - + Gập Luôn gập Mở rộng @@ -205,8 +205,8 @@ Tùy chỉnh Chọn chế độ Thêm Hook - + Đa phương tiện Nhẫn Thông báo @@ -218,7 +218,7 @@ Bạn có chắc muốn tắt ứng dụng này? Khởi động lại để áp dụng Tải xuống - + Trình chỉnh sửa Kích hoạt Tính năng @@ -413,10 +413,10 @@ Hiển thị tiện ích MIUI Hiển thị tiện ích MIUI trên trang tiện ích Android Mô-đun chưa được kích hoạt - + Điện thoại Ẩn nhạc chuông - + Trí tuệ xuất sắc Kiểm soát đám mây Vô hiệu hóa kiểm soát đám mây @@ -482,11 +482,11 @@ Đây là một tính năng có rủi ro cao, bất kỳ vấn đề nào phát sinh từ việc này sẽ do người dùng chịu, vui lòng sao lưu baseband của bạn cẩn thận. Nhập *#*#MODEMTEST#*#* trên giao diện quay số để mở Cài đặt MTB Âm nhạc Loại bỏ quảng cáo - + Thông báo - + Tất cả Âm thanh Tài liệu @@ -525,10 +525,10 @@ Ngăn chặn tắt ứng dụng nền Có thể tăng mức tiêu thụ điện năng Khoá FPS tối đa - + Đề xuất Ghi âm Sau khi đặt lại cấu hình mô-đun, tất cả dữ liệu của nó sẽ bị xóa! @@ -621,7 +621,7 @@ Khóa 100 điểm và vô hiệu hóa tối ưu hóa Chỉ hiển thị trong chế độ chỉnh sửa Chỉ hiện khi đang vuốt màn hình - + Cài đặt Sao lưu cài đặt module Khắc phục sự cố @@ -649,7 +649,7 @@ Chỉ ẩn khi không kết nối Luôn hiện Chỉ hiện khi đổ chuông - + Phím bật 5G nhanh Mạng 5G "Một cột bổ sung sẽ được thêm vào khi màn hình nằm dọc @@ -948,7 +948,7 @@ Chức năng này là chức năng thử nghiệm có độ ổn định cao"Thanh trạng thái Hẹn giờ mở rộng Hệ thống - + Chủ đề Vá chủ đề Vô hiệu quảng cáo diff --git a/app/src/main/res/values/attrs.xml b/app/src/main/res/values/attrs.xml index f6a8bf85d0..4f8809bb2a 100644 --- a/app/src/main/res/values/attrs.xml +++ b/app/src/main/res/values/attrs.xml @@ -77,7 +77,7 @@ - + diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 418e32f7f8..6fee6705ba 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -921,7 +921,7 @@ Choose a browser to open link System default Xiaomi browser - Clipboard + Clipboard Read clipboard Read the clipboard using Toast hints Official website diff --git a/app/src/main/res/xml/aiasst.xml b/app/src/main/res/xml/aiasst.xml index 948675067e..7e06696a5b 100644 --- a/app/src/main/res/xml/aiasst.xml +++ b/app/src/main/res/xml/aiasst.xml @@ -3,10 +3,10 @@ + android:title="@string/aiasst_ai_captions" + android:summary="@string/aiasst_ai_captions_desc" + android:key="prefs_key_aiasst_ai_captions" + android:defaultValue="false" /> diff --git a/app/src/main/res/xml/aireco.xml b/app/src/main/res/xml/aireco.xml index cc0a63ab84..df369a1e31 100644 --- a/app/src/main/res/xml/aireco.xml +++ b/app/src/main/res/xml/aireco.xml @@ -4,9 +4,9 @@ + android:title="@string/aireco_device_modify" + android:key="prefs_key_aireco_device_modify" + android:defaultValue="false" /> diff --git a/app/src/main/res/xml/browser.xml b/app/src/main/res/xml/browser.xml index 1812e842ab..95df46988c 100644 --- a/app/src/main/res/xml/browser.xml +++ b/app/src/main/res/xml/browser.xml @@ -4,10 +4,10 @@ + android:title="@string/browser_debug_mode" + android:summary="@string/browser_debug_mode_desc" + android:key="prefs_key_browser_debug_mode" + android:defaultValue="false" /> diff --git a/app/src/main/res/xml/camera.xml b/app/src/main/res/xml/camera.xml index 82b837b605..8f069b6169 100644 --- a/app/src/main/res/xml/camera.xml +++ b/app/src/main/res/xml/camera.xml @@ -1,260 +1,260 @@ + xmlns:app="http://schemas.android.com/apk/res-auto"> + android:title="@string/camera_shot_hand_gesture" + android:key="prefs_key_camera_shot_hand_gesture" + android:defaultValue="false" /> + android:title="@string/camera_shot_color_enhance" + android:key="prefs_key_camera_shot_color_enhance" + android:defaultValue="false" /> + android:title="@string/camera_shot_makeup" + android:summary="@string/camera_shot_makeup_desc" + android:key="prefs_key_camera_shot_makeup" + android:defaultValue="false" /> + android:title="@string/camera_record_60fps" + android:summary="@string/camera_record_60fps_desc" + android:key="prefs_key_camera_record_60fps" + android:defaultValue="false" /> + android:title="@string/camera_record_120fps" + android:summary="@string/camera_record_120fps_desc" + android:key="prefs_key_camera_record_120fps" + android:defaultValue="false" /> + android:title="@string/camera_record_hdr" + android:key="prefs_key_camera_record_hdr" + android:defaultValue="false" /> + android:title="@string/camera_record_ai" + android:key="prefs_key_camera_record_ai" + android:defaultValue="false" /> + android:title="@string/camera_record_audio_zoom" + android:key="prefs_key_camera_record_audio_zoom" + android:defaultValue="false" /> + android:title="@string/camera_portrait_cvlens" + android:summary="@string/camera_portrait_cvlens_desc" + android:key="prefs_key_camera_portrait_cvlens" + android:defaultValue="false" /> + android:title="@string/camera_portrait_new_beauty" + android:summary="@string/camera_portrait_new_beauty_desc" + android:key="prefs_key_camera_portrait_new_beauty" + android:defaultValue="false" /> + android:title="@string/camera_pro_raw" + android:key="prefs_key_camera_pro_raw" + android:defaultValue="false" /> + android:title="@string/camera_pro_log" + android:key="prefs_key_camera_pro_log" + android:defaultValue="false" /> + android:title="@string/camera_features_unlock_aiwatermark" + android:key="prefs_key_camera_features_unlock_aiwatermark" + android:defaultValue="false" /> + android:title="@string/camera_features_unlock_ambilight" + android:key="prefs_key_camera_features_unlock_ambilight" + android:defaultValue="false" /> + android:title="@string/camera_features_unlock_clone" + android:key="prefs_key_camera_features_unlock_clone" + android:defaultValue="false" /> + android:title="@string/camera_features_unlock_cosmetic_mirror" + android:key="prefs_key_camera_features_unlock_cosmetic_mirror" + android:defaultValue="false" /> + android:title="@string/camera_features_unlock_doc" + android:key="prefs_key_camera_features_unlock_doc" + android:defaultValue="false" /> + android:title="@string/camera_features_unlock_idcard" + android:key="prefs_key_camera_features_unlock_idcard" + android:dependency="prefs_key_camera_features_unlock_doc" + android:defaultValue="false" /> + android:title="@string/camera_features_unlock_dualcam" + android:key="prefs_key_camera_features_unlock_dualcam" + android:defaultValue="false" /> + android:title="@string/camera_features_unlock_duration" + android:key="prefs_key_camera_features_unlock_duration" + android:defaultValue="false" /> + android:title="@string/camera_features_unlock_milive" + android:key="prefs_key_camera_features_unlock_milive" + android:defaultValue="false" /> + android:title="@string/camera_features_unlock_moon" + android:key="prefs_key_camera_features_unlock_moon" + android:defaultValue="false" /> + android:title="@string/camera_features_unlock_pano" + android:key="prefs_key_camera_features_unlock_pano" + android:defaultValue="false" /> + android:title="@string/camera_features_unlock_pixel" + android:key="prefs_key_camera_features_unlock_pixel" + android:defaultValue="false" /> + android:title="@string/camera_features_unlock_portrait" + android:key="prefs_key_camera_features_unlock_portrait" + android:defaultValue="false" /> + android:title="@string/camera_features_unlock_slow" + android:key="prefs_key_camera_features_unlock_slow" + android:defaultValue="false" /> + android:title="@string/camera_features_unlock_videosky" + android:key="prefs_key_camera_features_unlock_videosky" + android:defaultValue="false" + app:isPreferenceVisible="false" /> + android:title="@string/camera_features_unlock_vlog" + android:key="prefs_key_camera_features_unlock_vlog" + android:defaultValue="false" /> + android:title="@string/camera_features_unlock_vlog_pro" + android:key="prefs_key_camera_features_unlock_vlog_pro" + android:defaultValue="false" /> + android:title="@string/camera_features_unlock_film" + android:key="prefs_key_camera_features_unlock_film" + android:defaultValue="false" /> + android:title="@string/camera_features_unlock_film_delay" + android:key="prefs_key_camera_features_unlock_film_delay" + android:dependency="prefs_key_camera_features_unlock_film" + android:defaultValue="false" /> + android:title="@string/camera_features_unlock_film_dollyzoom" + android:key="prefs_key_camera_features_unlock_film_dollyzoom" + android:dependency="prefs_key_camera_features_unlock_film" + android:defaultValue="false" /> + android:title="@string/camera_features_unlock_film_dream" + android:key="prefs_key_camera_features_unlock_film_dream" + android:dependency="prefs_key_camera_features_unlock_film" + android:defaultValue="false" /> + android:title="@string/camera_features_unlock_film_slowshutter" + android:key="prefs_key_camera_features_unlock_film_slowshutter" + android:dependency="prefs_key_camera_features_unlock_film" + android:defaultValue="false" /> + android:title="@string/camera_features_unlock_film_timebackflow" + android:key="prefs_key_camera_features_unlock_film_timebackflow" + android:dependency="prefs_key_camera_features_unlock_film" + android:defaultValue="false" /> + android:title="@string/camera_features_unlock_film_timefreeze" + android:key="prefs_key_camera_features_unlock_film_timefreeze" + android:dependency="prefs_key_camera_features_unlock_film" + android:defaultValue="false" /> + android:title="@string/camera_settings_track_focus" + android:key="prefs_key_camera_settings_track_focus" + android:defaultValue="false" /> + android:title="@string/camera_settings_heic" + android:key="prefs_key_camera_settings_heic" + android:defaultValue="false" /> + android:title="@string/camera_settings_predictive" + android:key="prefs_key_camera_settings_predictive" + android:defaultValue="false" /> + android:title="@string/camera_settings_nevus" + android:key="prefs_key_camera_settings_nevus" + android:defaultValue="false" /> + android:title="@string/camera_settings_men_makeup" + android:key="prefs_key_camera_settings_men_makeup" + android:defaultValue="false" /> + android:title="@string/camera_settings_lab_options" + android:key="prefs_key_camera_settings_lab_options" + android:defaultValue="false" /> + android:title="@string/camera_settings_track_eyes" + android:key="prefs_key_camera_settings_track_eyes" + android:dependency="prefs_key_camera_settings_lab_options" + android:defaultValue="false" /> - + \ No newline at end of file diff --git a/app/src/main/res/xml/downloads.xml b/app/src/main/res/xml/downloads.xml index 7136a584f6..e42766fee5 100644 --- a/app/src/main/res/xml/downloads.xml +++ b/app/src/main/res/xml/downloads.xml @@ -2,11 +2,11 @@ + android:title="@string/various_fuck_xlDownload" + android:summary="@string/various_fuck_xlDownload_desc" + android:key="prefs_key_various_fuck_xlDownload" + android:defaultValue="false" /> - + \ No newline at end of file diff --git a/app/src/main/res/xml/gallery.xml b/app/src/main/res/xml/gallery.xml index 4da5845ec9..37b3f145aa 100644 --- a/app/src/main/res/xml/gallery.xml +++ b/app/src/main/res/xml/gallery.xml @@ -2,65 +2,65 @@ + android:title="@string/gallery_enable_hdr_enhanced" + android:key="prefs_key_gallery_enable_hdr_enhanced" + android:defaultValue="false" /> + android:title="@string/gallery_unlock_super_clipboard" + android:summary="@string/gallery_unlock_super_clipboard_desc" + android:key="prefs_key_gallery_unlock_super_clipboard" + android:defaultValue="false" /> + android:title="@string/gallery_enable_pdf" + android:key="prefs_key_gallery_enable_pdf" + android:defaultValue="false" /> + android:title="@string/gallery_enable_ocr" + android:key="prefs_key_gallery_enable_ocr" + android:defaultValue="false" /> + android:title="@string/gallery_enable_ocr_form" + android:key="prefs_key_gallery_enable_ocr_form" + android:defaultValue="false" /> + android:title="@string/gallery_enable_id_photo" + android:key="prefs_key_gallery_enable_id_photo" + android:defaultValue="false" /> + android:title="@string/gallery_enable_photo_movie" + android:key="prefs_key_gallery_enable_photo_movie" + android:defaultValue="false" /> + android:title="@string/gallery_enable_video_post" + android:key="prefs_key_gallery_enable_video_post" + android:defaultValue="false" /> + android:title="@string/gallery_enable_video_editor" + android:key="prefs_key_gallery_enable_video_editor" + android:defaultValue="false" /> + android:title="@string/gallery_enable_text_yanhua" + android:key="prefs_key_gallery_enable_text_yanhua" + android:defaultValue="false" /> + android:title="@string/gallery_enable_remover_2" + android:key="prefs_key_gallery_enable_remover_2" + android:defaultValue="false" /> + android:title="@string/gallery_enable_magic_matting" + android:key="prefs_key_gallery_enable_magic_matting" + android:defaultValue="false" /> + android:title="@string/gallery_enable_magic_sky" + android:key="prefs_key_gallery_enable_magic_sky" + android:defaultValue="false" /> - + \ No newline at end of file diff --git a/app/src/main/res/xml/guard_provider.xml b/app/src/main/res/xml/guard_provider.xml index a8608026d0..195f9daddf 100644 --- a/app/src/main/res/xml/guard_provider.xml +++ b/app/src/main/res/xml/guard_provider.xml @@ -1,10 +1,10 @@ + android:title="@string/guard_provider_disable_upload_applist" + android:key="prefs_key_disable_upload_applist" + android:defaultValue="false" /> - + \ No newline at end of file diff --git a/app/src/main/res/xml/home.xml b/app/src/main/res/xml/home.xml index e2ee7235c2..32babaa07a 100644 --- a/app/src/main/res/xml/home.xml +++ b/app/src/main/res/xml/home.xml @@ -73,6 +73,6 @@ android:targetPackage="com.sevtinge.cemiuiler" /> - + \ No newline at end of file diff --git a/app/src/main/res/xml/home_dock.xml b/app/src/main/res/xml/home_dock.xml index 5b2ebcde72..720a720f4f 100644 --- a/app/src/main/res/xml/home_dock.xml +++ b/app/src/main/res/xml/home_dock.xml @@ -8,27 +8,27 @@ android:defaultValue="false" /> + android:key="prefs_key_home_dock_icon_title" + android:title="@string/home_dock_icon_title" + android:defaultValue="false" /> + android:key="prefs_key_home_dock_fold" + android:title="@string/home_dock_fold" + android:defaultValue="false" /> + android:title="@string/home_dock_hide_seekpoint" + android:key="prefs_key_home_dock_hide_seekpoint" + android:defaultValue="false" + app:isPreferenceVisible="false" /> + android:title="@string/home_dock_bg_custom_enable" + android:key="prefs_key_home_dock_bg_custom_enable" + android:defaultValue="false" /> - + \ No newline at end of file diff --git a/app/src/main/res/xml/home_drawer.xml b/app/src/main/res/xml/home_drawer.xml index f3addf53eb..f91af378f2 100644 --- a/app/src/main/res/xml/home_drawer.xml +++ b/app/src/main/res/xml/home_drawer.xml @@ -6,21 +6,21 @@ + android:defaultValue="false" /> + android:defaultValue="false" /> + android:defaultValue="false" /> - + \ No newline at end of file diff --git a/app/src/main/res/xml/home_folder.xml b/app/src/main/res/xml/home_folder.xml index d5a19a8d38..d6c537d49e 100644 --- a/app/src/main/res/xml/home_folder.xml +++ b/app/src/main/res/xml/home_folder.xml @@ -12,7 +12,7 @@ + android:dependency="prefs_key_home_small_folder_icon_bg" /> + android:dependency="prefs_key_home_small_folder_icon_bg" /> - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + android:key="prefs_key_home_folder_shade_level" + android:title="@string/home_folder_shade_level_title" + android:defaultValue="0" + app:maxValue="100" + android:format="%d %%" + app:showSeekBarValue="true" /> + android:defaultValue="110" + android:dependency="prefs_key_home_folder_animation" + android:key="prefs_key_home_folder_anim_1" + android:title="@string/home_folder_anim_1" + android:format="%d / 100 f" + app:maxValue="150" + app:minValue="50" + app:showSeekBarValue="true" /> + android:defaultValue="30" + android:dependency="prefs_key_home_folder_animation" + android:key="prefs_key_home_folder_anim_2" + android:title="@string/home_folder_anim_2" + android:format="%d / 30 f" + app:maxValue="60" + app:minValue="10" + app:showSeekBarValue="true" /> + android:defaultValue="101" + android:dependency="prefs_key_home_folder_animation" + android:key="prefs_key_home_folder_anim_3" + android:title="@string/home_folder_anim_3" + android:format="%d / 100 f" + app:maxValue="150" + app:minValue="50" + app:showSeekBarValue="true" /> + android:defaultValue="24" + android:dependency="prefs_key_home_folder_animation" + android:key="prefs_key_home_folder_anim_4" + android:title="@string/home_folder_anim_4" + android:format="%d / 30 f" + app:maxValue="60" + app:minValue="10" + app:showSeekBarValue="true" /> + android:key="prefs_key_home_folder_auto_close" + android:title="@string/home_auto_close_folder_title" + android:summary="@string/home_auto_close_folder_summary" + android:defaultValue="false" /> + android:key="prefs_key_home_folder_space" + android:title="@string/home_folder_space_title" + android:defaultValue="false" /> + android:key="prefs_key_home_folder_blur" + android:title="@string/home_folder_blur_title" + android:defaultValue="false" /> + app:showSeekBarValue="true" /> + app:showSeekBarValue="true" /> - + \ No newline at end of file diff --git a/app/src/main/res/xml/home_gesture.xml b/app/src/main/res/xml/home_gesture.xml index 95d5bc3cb1..cd44bfcb07 100644 --- a/app/src/main/res/xml/home_gesture.xml +++ b/app/src/main/res/xml/home_gesture.xml @@ -6,42 +6,42 @@ + android:summary="@string/home_gesture_double_tap_desc" /> + android:summary="@string/home_gesture_shake_desc" /> + android:summary="@string/home_gesture_left_swipe_desc" /> + android:summary="@string/home_gesture_right_swipe_desc" /> + android:summary="@string/home_gesture_up_swipe_desc" /> + android:summary="@string/home_gesture_down_swipe_desc" /> + android:summary="@string/home_gesture_up_swipe2_desc" /> + android:summary="@string/home_gesture_down_swipe2_desc" /> + android:title="@string/home_layout_searchbar_margin_bottom" + android:summary="@string/home_layout_searchbar_margin_bottom_desc" + android:key="prefs_key_home_layout_searchbar_margin_bottom_enable" + android:defaultValue="false" /> + android:layout="@layout/preference_seekbar_no_padding" + android:key="prefs_key_home_layout_searchbar_margin_bottom" + android:defaultValue="30" + app:dialogTitle="@string/home_layout_searchbar_margin_bottom" + app:maxValue="100" + android:format="%d dp" + app:showSeekBarValue="true" + android:dependency="prefs_key_home_layout_searchbar_margin_bottom_enable" /> - + \ No newline at end of file diff --git a/app/src/main/res/xml/home_multi_action.xml b/app/src/main/res/xml/home_multi_action.xml index 617acf9804..0def1068e3 100644 --- a/app/src/main/res/xml/home_multi_action.xml +++ b/app/src/main/res/xml/home_multi_action.xml @@ -1,7 +1,7 @@ - + @@ -9,52 +9,52 @@ android:persistent="false" android:key="prefs_key_no_action" android:title="@string/array_global_actions_none" - android:layout="@layout/preference_radiobutton_two_state"/> + android:layout="@layout/preference_radiobutton_two_state" /> + android:layout="@layout/preference_radiobutton_two_state" /> + android:layout="@layout/preference_radiobutton_two_state" /> + android:layout="@layout/preference_radiobutton_two_state" /> + android:layout="@layout/preference_radiobutton_two_state" /> + android:layout="@layout/preference_radiobutton_two_state" /> + android:layout="@layout/preference_radiobutton_two_state" /> + android:layout="@layout/preference_radiobutton_two_state" /> + android:layout="@layout/preference_radiobutton_two_state" /> + android:layout="@layout/preference_radiobutton_two_state" /> diff --git a/app/src/main/res/xml/home_other.xml b/app/src/main/res/xml/home_other.xml index 26d525430b..f74a8ce1e0 100644 --- a/app/src/main/res/xml/home_other.xml +++ b/app/src/main/res/xml/home_other.xml @@ -7,7 +7,7 @@ + android:defaultValue="false" /> @@ -29,7 +29,7 @@ android:title="@string/home_other_infinite_scroll" android:summary="@string/home_other_infinite_scroll_desc" android:key="prefs_key_home_other_infinite_scroll" - android:defaultValue="false"/> + android:defaultValue="false" /> + android:defaultValue="false" /> + android:key="prefs_key_home_other_disable_hide_google" + android:title="@string/home_other_disable_hide_google" + android:defaultValue="false" /> + android:key="prefs_key_home_other_fix_android_r_s" + android:title="@string/home_other_fix_android_r_s" + android:defaultValue="false" /> + android:key="prefs_key_home_other_high_models" + android:title="@string/home_other_high_models" + android:defaultValue="false" /> @@ -70,36 +70,36 @@ android:key="prefs_key_home_other_freeform_shortcut_menu" android:defaultValue="false" android:title="@string/home_other_freeform_shortcut_menu" - android:summary="@string/home_other_freeform_shortcut_menu_desc"/> + android:summary="@string/home_other_freeform_shortcut_menu_desc" /> + android:defaultValue="false" /> + android:title="@string/home_other_shortcut_background_blur_custom" + android:key="prefs_key_home_other_shortcut_background_blur_custom" + android:defaultValue="200" + app:minValue="10" + app:maxValue="255" + android:format="%s" + app:showSeekBarValue="true" + android:dependency="prefs_key_home_other_shortcut_background_blur" /> + android:key="prefs_key_home_other_shortcut_remove_restrictions" + android:title="@string/home_other_shortcut_remove_restrictions" + android:defaultValue="false" /> + android:key="prefs_key_home_other_blur_radius" + android:title="@string/home_other_blur_radius" + android:defaultValue="100" + app:maxValue="500" + app:minValue="0" + android:format="%s / 100 f" + app:showSeekBarValue="true" /> - + \ No newline at end of file diff --git a/app/src/main/res/xml/home_recent.xml b/app/src/main/res/xml/home_recent.xml index 9376ba3f4b..41230bd693 100644 --- a/app/src/main/res/xml/home_recent.xml +++ b/app/src/main/res/xml/home_recent.xml @@ -1,131 +1,131 @@ + xmlns:app="http://schemas.android.com/apk/res-auto"> + android:key="prefs_key_home_recent_disable_wallpaper_dimming" + android:title="@string/home_recent_disable_wallpaper_dimming" + android:defaultValue="false" /> + android:key="prefs_key_home_recent_show_real_memory" + android:title="@string/home_recent_show_real_memory" + android:defaultValue="false" /> + android:key="prefs_key_home_recent_modify_animation" + android:title="@string/home_recent_modify_animation" + android:defaultValue="false" /> + android:key="prefs_key_home_recent_hide_status_bar_in_task_view" + android:title="@string/home_recent_hide_status_bar_in_task_view" + android:defaultValue="false" /> + android:key="prefs_key_home_recent_hide_freeform" + android:title="@string/home_recent_hide_freeform" + android:defaultValue="false" /> + android:key="prefs_key_home_recent_hide_clean_up" + android:title="@string/home_recent_hide_clean_up" + android:defaultValue="false" /> + android:key="prefs_key_home_recent_remove_icon" + android:title="@string/home_recent_remove_icon" + android:defaultValue="false" /> + android:key="prefs_key_home_recent_blur_level" + android:title="@string/home_recent_blur_level" + android:defaultValue="6" + app:entries="@array/home_recent_blur" + app:entryValues="@array/home_recent_blur_value" /> + android:key="prefs_key_home_recent_text" + android:title="@string/home_recent_text" /> + android:defaultValue="20" + android:key="prefs_key_task_view_corners" + android:title="@string/home_recent_task_view_card_rounded_corners" + android:format="%d dp" + app:maxValue="100" + app:showSeekBarValue="true" /> + + - - + app:showSeekBarValue="true" /> + android:defaultValue="100" + android:key="prefs_key_task_view_horizontal1" + android:title="@string/home_recent_horizontal_task_view_card_size1" + android:format="%d / 100 f" + app:maxValue="150" + app:minValue="50" + app:showSeekBarValue="true" /> + android:defaultValue="100" + android:key="prefs_key_task_view_horizontal2" + android:title="@string/home_recent_horizontal_task_view_card_size2" + android:format="%d / 100 f" + app:maxValue="150" + app:minValue="50" + app:showSeekBarValue="true" /> + android:defaultValue="100" + android:key="prefs_key_home_recent_vertical_task_view_card_size" + android:title="@string/home_recent_vertical_task_view_card_size" + android:format="%d / 100 f" + app:maxValue="150" + app:minValue="50" + app:showSeekBarValue="true" /> + android:defaultValue="14" + android:key="prefs_key_home_recent_text_size" + android:title="@string/home_recent_text_size" + android:format="%d f" + app:maxValue="30" + app:minValue="0" + app:showSeekBarValue="true" /> + android:persistent="false" + android:title="@string/home_recent_text_color" + android:key="prefs_key_home_recent_text_color" + android:defaultValue="-1" + app:showAlphaSlider="true" /> + android:persistent="false" + android:title="@string/home_recent_freeform_background_color" + android:key="prefs_key_home_recent_freeform_background_color" + android:defaultValue="-1" + app:showAlphaSlider="true" /> - + \ No newline at end of file diff --git a/app/src/main/res/xml/home_title.xml b/app/src/main/res/xml/home_title.xml index 1ecbe13434..f635549921 100644 --- a/app/src/main/res/xml/home_title.xml +++ b/app/src/main/res/xml/home_title.xml @@ -4,36 +4,36 @@ + android:title="@string/home_title_big_icon_corner" + android:key="prefs_key_home_title_big_icon_corner" + android:defaultValue="false" /> + android:key="prefs_key_home_other_perfect_icon" + android:title="@string/home_other_perfect_icon" + android:defaultValue="false" /> + android:key="prefs_key_home_title_download_animation" + android:title="@string/home_title_download_animation" + android:defaultValue="false" /> + android:key="prefs_key_home_other_icon_mono_chrome" + android:title="@string/home_other_icon_mono_chrome" + android:defaultValue="false" /> + android:key="prefs_key_home_other_icon_monet_color" + android:title="@string/home_other_icon_monet_color" + android:defaultValue="false" + android:dependency="prefs_key_home_other_icon_mono_chrome" /> + android:dependency="prefs_key_home_other_icon_mono_chrome" /> + app:showAlphaSlider="false" /> + android:key="prefs_key_home_title_animation_speed" + android:title="@string/home_title_animation_speed" + android:defaultValue="100" + app:maxValue="500" + app:minValue="10" + android:format="%s / 100 f" + app:showSeekBarValue="true" /> + android:key="prefs_key_home_title_fix_animation" + android:title="@string/home_title_fix_animation" + android:defaultValue="false" /> @@ -79,13 +79,13 @@ android:defaultValue="false" /> + android:title="@string/home_large_icon_corner_radius" + android:key="prefs_key_home_large_icon_corner_radius" + android:dependency="prefs_key_home_large_icon_enable" + android:defaultValue="32" + app:maxValue="90" + android:format="%d dp" + app:showSeekBarValue="true" /> @@ -94,14 +94,14 @@ + android:defaultValue="false" /> + android:persistent="false" + android:title="@string/home_title_title_color" + android:key="prefs_key_home_title_title_color" + android:defaultValue="-1" + app:showAlphaSlider="false" /> - + \ No newline at end of file diff --git a/app/src/main/res/xml/home_widget.xml b/app/src/main/res/xml/home_widget.xml index 68f0b98ef3..efd6ebf93f 100644 --- a/app/src/main/res/xml/home_widget.xml +++ b/app/src/main/res/xml/home_widget.xml @@ -2,9 +2,9 @@ + android:key="prefs_key_home_widget_all_widget_animation" + android:title="@string/home_widget_all_widget_animation" + android:defaultValue="false" /> + android:key="prefs_key_home_widget_hide_title" + android:title="@string/home_widget_hide_title" + android:defaultValue="false" /> + android:key="prefs_key_home_widget_allow_moved_to_minus_one_screen" + android:title="@string/home_widget_allow_moved_to_minus_one_screen" + android:defaultValue="false" /> - + \ No newline at end of file diff --git a/app/src/main/res/xml/incallui.xml b/app/src/main/res/xml/incallui.xml index 9726ea565d..3f4f8a5ed7 100644 --- a/app/src/main/res/xml/incallui.xml +++ b/app/src/main/res/xml/incallui.xml @@ -3,14 +3,13 @@ - + android:title="@string/incallui_hide_crbt" + android:key="prefs_key_incallui_hide_crbt" + android:defaultValue="false" /> - + \ No newline at end of file diff --git a/app/src/main/res/xml/joyose.xml b/app/src/main/res/xml/joyose.xml index 0fddf86ec3..b5d76395cd 100644 --- a/app/src/main/res/xml/joyose.xml +++ b/app/src/main/res/xml/joyose.xml @@ -2,21 +2,21 @@ + android:title="@string/joyose_disable_cloud_control" + android:key="prefs_key_various_disable_cloud_control" + android:defaultValue="false" /> + android:title="@string/joyose_enable_gpu_tuner" + android:summary="@string/joyose_enable_gpu_tuner_desc" + android:key="prefs_key_joyose_enable_gpu_tuner" + android:defaultValue="false" /> - + \ No newline at end of file diff --git a/app/src/main/res/xml/market.xml b/app/src/main/res/xml/market.xml index d8e3533ff3..1979a79ade 100644 --- a/app/src/main/res/xml/market.xml +++ b/app/src/main/res/xml/market.xml @@ -1,24 +1,24 @@ + xmlns:app="http://schemas.android.com/apk/res-auto"> + android:key="prefs_key_market_device_modify_new" + android:title="@string/market_device_modify" + android:defaultValue="0" + app:entries="@array/market_device_modify_list" + app:entryValues="@array/market_device_modify_value" /> + android:title="@string/market_disable_new_icon" + android:summary="@string/market_disable_new_icon_desc" + android:key="prefs_key_market_disable_new_icon" + android:defaultValue="false" + app:isPreferenceVisible="false" /> - + \ No newline at end of file diff --git a/app/src/main/res/xml/mediaeditor.xml b/app/src/main/res/xml/mediaeditor.xml index df91d1a855..28326cbeca 100644 --- a/app/src/main/res/xml/mediaeditor.xml +++ b/app/src/main/res/xml/mediaeditor.xml @@ -3,17 +3,17 @@ + android:title="@string/mediaeditor_unlock_minimum_crop_limit" + android:key="prefs_key_mediaeditor_unlock_minimum_crop_limit" + android:defaultValue="false" /> + android:defaultValue="false" /> - + \ No newline at end of file diff --git a/app/src/main/res/xml/mi_settings.xml b/app/src/main/res/xml/mi_settings.xml index 29b2c87376..1c1c581d27 100644 --- a/app/src/main/res/xml/mi_settings.xml +++ b/app/src/main/res/xml/mi_settings.xml @@ -2,10 +2,10 @@ + android:title="@string/mi_settings_show_fps" + android:key="prefs_key_mi_settings_show_fps" + android:defaultValue="false" /> - + \ No newline at end of file diff --git a/app/src/main/res/xml/milink.xml b/app/src/main/res/xml/milink.xml index 6abeb1570a..5309dd8f6b 100644 --- a/app/src/main/res/xml/milink.xml +++ b/app/src/main/res/xml/milink.xml @@ -1,10 +1,10 @@ + android:title="@string/milink_unlock_mishare" + android:key="prefs_key_milink_unlock_mishare" + android:defaultValue="false" /> - + \ No newline at end of file diff --git a/app/src/main/res/xml/mirror.xml b/app/src/main/res/xml/mirror.xml index 4fe6c28bdc..f08a560af7 100644 --- a/app/src/main/res/xml/mirror.xml +++ b/app/src/main/res/xml/mirror.xml @@ -3,14 +3,13 @@ - + android:title="@string/mirror_unlock_miui_plus" + android:key="prefs_key_mirror_unlock_miui_plus" + android:defaultValue="false" /> - + \ No newline at end of file diff --git a/app/src/main/res/xml/mishare.xml b/app/src/main/res/xml/mishare.xml index c1a4528325..5182ef6afe 100644 --- a/app/src/main/res/xml/mishare.xml +++ b/app/src/main/res/xml/mishare.xml @@ -2,10 +2,10 @@ + android:title="@string/mishare_disable_mishare_auto_off" + android:key="prefs_key_disable_mishare_auto_off" + android:defaultValue="false" /> - + \ No newline at end of file diff --git a/app/src/main/res/xml/miwallpaper.xml b/app/src/main/res/xml/miwallpaper.xml index eec754ce28..c35c8cf2fa 100644 --- a/app/src/main/res/xml/miwallpaper.xml +++ b/app/src/main/res/xml/miwallpaper.xml @@ -4,10 +4,10 @@ + android:defaultValue="false" + android:key="prefs_key_miwallpaper_unlock_super_wallpaper" + android:title="@string/miwallpaper_unlock_super_wallpaper" + android:summary="@string/disable_detailed_log_desc" /> diff --git a/app/src/main/res/xml/mms.xml b/app/src/main/res/xml/mms.xml index dbcfd8c4f6..5f53a5fce2 100644 --- a/app/src/main/res/xml/mms.xml +++ b/app/src/main/res/xml/mms.xml @@ -2,11 +2,11 @@ + android:title="@string/mms_disable_ad" + android:summary="@string/mms_disable_ad_desc" + android:key="prefs_key_mms_disable_ad" + android:defaultValue="false" /> - + \ No newline at end of file diff --git a/app/src/main/res/xml/mtb.xml b/app/src/main/res/xml/mtb.xml index 082e583ec4..5745e6e277 100644 --- a/app/src/main/res/xml/mtb.xml +++ b/app/src/main/res/xml/mtb.xml @@ -1,10 +1,10 @@ + android:title="@string/mtb_auth" + android:summary="@string/mtb_auth_desc" + android:key="prefs_key_mtb_auth" + android:defaultValue="false" /> diff --git a/app/src/main/res/xml/music.xml b/app/src/main/res/xml/music.xml index 95363cdfb5..37d7f28eef 100644 --- a/app/src/main/res/xml/music.xml +++ b/app/src/main/res/xml/music.xml @@ -3,13 +3,12 @@ - + android:title="@string/music_disable_ad" + android:key="prefs_key_music_disable_ad" + android:defaultValue="false" /> - + \ No newline at end of file diff --git a/app/src/main/res/xml/package_installer.xml b/app/src/main/res/xml/package_installer.xml index b420495257..8f601804cc 100644 --- a/app/src/main/res/xml/package_installer.xml +++ b/app/src/main/res/xml/package_installer.xml @@ -12,33 +12,33 @@ + android:defaultValue="false" /> + android:defaultValue="false" /> + android:defaultValue="false" /> + android:defaultValue="false" /> + android:key="prefs_key_miui_package_installer_count_checking" + android:title="@string/miui_package_installer_count_checking" + android:defaultValue="false" /> + android:defaultValue="false" /> + android:defaultValue="false" /> - + \ No newline at end of file diff --git a/app/src/main/res/xml/personal_assistant.xml b/app/src/main/res/xml/personal_assistant.xml index d6dd9a362e..e91143ae35 100644 --- a/app/src/main/res/xml/personal_assistant.xml +++ b/app/src/main/res/xml/personal_assistant.xml @@ -6,12 +6,12 @@ + android:defaultValue="false" /> + android:summary="@string/personal_assistant_fold_widget_enable_desc" /> + android:dependency="prefs_key_pa_enable" /> - + app:showAlphaSlider="true" /> - + \ No newline at end of file diff --git a/app/src/main/res/xml/phone.xml b/app/src/main/res/xml/phone.xml index 5d43785820..5bbeca2eff 100644 --- a/app/src/main/res/xml/phone.xml +++ b/app/src/main/res/xml/phone.xml @@ -1,15 +1,15 @@ + android:title="@string/phone_smart_dual_sim" + android:key="prefs_key_phone_smart_dual_sim" + android:defaultValue="false" /> + android:title="@string/phone_vice_slot_volte" + android:summary="@string/phone_vice_slot_volte_desc" + android:key="prefs_key_phone_vice_slot_volte" + android:defaultValue="false" /> diff --git a/app/src/main/res/xml/powerkeeper.xml b/app/src/main/res/xml/powerkeeper.xml index d9e80bd6a4..cb27de7c4c 100644 --- a/app/src/main/res/xml/powerkeeper.xml +++ b/app/src/main/res/xml/powerkeeper.xml @@ -2,20 +2,20 @@ + android:title="@string/powerkeeper_custom_refresh_rate" + android:key="prefs_key_various_custom_refresh_rate" + android:defaultValue="false" /> + android:title="@string/powerkeeper_lock_max_fps" + android:key="prefs_key_powerkeeper_lock_max_fps" + android:defaultValue="false" /> + android:title="@string/powerkeeper_do_not_kill_apps" + android:summary="@string/powerkeeper_do_not_kill_apps_desc" + android:key="prefs_key_powerkeeper_do_not_kill_apps" + android:defaultValue="false" /> diff --git a/app/src/main/res/xml/prefs_about.xml b/app/src/main/res/xml/prefs_about.xml index 0d4a16a289..1cf3134c8e 100644 --- a/app/src/main/res/xml/prefs_about.xml +++ b/app/src/main/res/xml/prefs_about.xml @@ -1,73 +1,72 @@ - + + android:layout="@layout/activity_about" + android:key="prefs_key_hidden_function" + android:summary="@string/xposed_description" /> + android:icon="@drawable/ic_sevtinge" + android:layout="@layout/preference_round_layout" + android:title="绀漓 | Sevtinge" + android:summary="Hook、App Icon"> + android:action="android.intent.action.VIEW" + android:data="https://github.com/sevtinge" /> + android:icon="@drawable/ic_moralnorm" + android:layout="@layout/preference_round_layout" + android:title="MoralNorm" + android:summary="UI Design、Hook"> + android:action="android.intent.action.VIEW" + android:data="https://github.com/MoralNorm" /> + android:icon="@drawable/ic_linqiqi" + android:layout="@layout/preference_round_layout" + android:title="Lin Qiqi" + android:summary="Hook"> + android:action="android.intent.action.VIEW" + android:data="https://github.com/mu7220" /> + android:icon="@drawable/ic_voyager" + android:layout="@layout/preference_round_layout" + android:title="Voyager" + android:summary="Hook"> + android:action="android.intent.action.VIEW" + android:data="https://github.com/hosizoraru" /> + android:icon="@drawable/ic_yifeplayte" + android:layout="@layout/preference_round_layout" + android:title="Yife Playte" + android:summary="Hook"> + android:action="android.intent.action.VIEW" + android:data="https://github.com/YifePlayte" /> + android:title="@string/about_contributer" + android:key="prefs_key_about_contributer"> + android:targetPackage="com.sevtinge.cemiuiler" + android:targetClass="com.sevtinge.cemiuiler.ui.AboutContributerActivity" /> + android:title="@string/translator" + android:summary="@string/language"> + android:action="android.intent.action.VIEW" + android:data="@string/translator_url" /> - + \ No newline at end of file diff --git a/app/src/main/res/xml/scanner.xml b/app/src/main/res/xml/scanner.xml index be917cece2..477a545e9c 100644 --- a/app/src/main/res/xml/scanner.xml +++ b/app/src/main/res/xml/scanner.xml @@ -4,44 +4,44 @@ + android:title="@string/scanner_card" + android:key="prefs_key_scanner_card" + android:defaultValue="false" /> + android:title="@string/scanner_translation" + android:key="prefs_key_scanner_translation" + android:defaultValue="false" /> + android:title="@string/scanner_ocr" + android:key="prefs_key_scanner_ocr" + android:defaultValue="false" /> + android:title="@string/scanner_document" + android:key="prefs_key_scanner_document" + android:defaultValue="false" /> + android:title="@string/scanner_excel" + android:key="prefs_key_scanner_excel" + android:defaultValue="false" + android:dependency="prefs_key_scanner_document" /> + android:title="@string/scanner_ppt" + android:key="prefs_key_scanner_ppt" + android:defaultValue="false" + android:dependency="prefs_key_scanner_document" /> + android:title="@string/scanner_doc_ppt" + android:key="prefs_key_scanner_doc_ppt" + android:defaultValue="false" /> - + \ No newline at end of file diff --git a/app/src/main/res/xml/screenrecorder.xml b/app/src/main/res/xml/screenrecorder.xml index 2f1165ade3..0ae99016bf 100644 --- a/app/src/main/res/xml/screenrecorder.xml +++ b/app/src/main/res/xml/screenrecorder.xml @@ -3,30 +3,30 @@ + android:title="@string/screen_recorder_config" + android:summary="@string/screen_recorder_config_desc" + android:key="prefs_key_screenrecorder_config" + android:defaultValue="false" /> + android:title="@string/screen_recorder_more_volume" + android:summary="@string/screen_recorder_more_volume_desc" + android:key="prefs_key_screenrecorder_more_volume" + android:defaultValue="false" /> + android:title="@string/screen_recorder_force_support_playback_capture" + android:summary="@string/screen_recorder_force_support_playback_capture_desc" + android:key="prefs_key_screenrecorder_force_support_playback_capture" + android:defaultValue="false" /> + android:defaultValue="false" /> - + \ No newline at end of file diff --git a/app/src/main/res/xml/screenshot.xml b/app/src/main/res/xml/screenshot.xml index 32412fd2d1..4824627e84 100644 --- a/app/src/main/res/xml/screenshot.xml +++ b/app/src/main/res/xml/screenshot.xml @@ -3,16 +3,16 @@ + android:title="@string/screenshot_unlock_minimum_crop_limit" + android:key="prefs_key_screenshot_unlock_minimum_crop_limit" + android:defaultValue="false" /> + android:defaultValue="false" /> - + \ No newline at end of file diff --git a/app/src/main/res/xml/security_center.xml b/app/src/main/res/xml/security_center.xml index d8a105c982..f7c8c9a1cc 100644 --- a/app/src/main/res/xml/security_center.xml +++ b/app/src/main/res/xml/security_center.xml @@ -43,21 +43,21 @@ android:key="prefs_key_security_center_show_battery_temperature" android:title="@string/security_center_show_battery_temperature" android:defaultValue="false" - app:isPreferenceVisible="true"/> + app:isPreferenceVisible="true" /> + android:key="prefs_key_security_center_super_wireless_charge" + android:title="@string/security_center_super_wireless_charge" + android:defaultValue="false" /> + android:key="prefs_key_security_center_ai_clipboard" + android:title="@string/security_center_ai_clipboard" + android:defaultValue="false" /> + android:key="prefs_key_security_center_get_number" + android:title="@string/security_center_get_number" + android:defaultValue="false" /> + android:key="prefs_key_security_center_beauty_light" + android:title="@string/security_center_beauty_light" + android:defaultValue="false" /> + android:key="prefs_key_security_center_beauty_light_auto" + android:title="@string/security_center_beauty_light_auto" + android:defaultValue="false" + android:dependency="prefs_key_security_center_beauty_light" /> + android:key="prefs_key_security_center_beauty_face" + android:title="@string/security_center_beauty_face" + android:defaultValue="false" /> + android:key="prefs_key_security_center_beauty_privacy" + android:title="@string/security_center_beauty_privacy" + android:defaultValue="false" /> + android:key="prefs_key_security_center_beauty_pc" + android:title="@string/security_center_beauty_pc" + android:defaultValue="false" /> + android:title="@string/security_center_unlock_side_hide_freeform" + android:summary="@string/security_center_unlock_side_hide_freeform_desc" + android:key="prefs_key_security_center_unlock_side_hide_freeform" + android:defaultValue="false" + app:isPreferenceVisible="false" /> + android:title="@string/security_center_remove_conversation_bubble_settings_restriction" + android:key="prefs_key_security_center_remove_conversation_bubble_settings_restriction" + android:defaultValue="false" /> + android:title="@string/security_center_sidebar_line_color" + android:key="prefs_key_security_center_sidebar_line_color" + android:defaultValue="false" + android:enabled="false" /> + android:persistent="false" + android:title="@string/security_center_sidebar_line_color_default" + android:key="prefs_key_security_center_sidebar_line_color_default" + android:defaultValue="-1294740525" + app:showAlphaSlider="true" + android:dependency="prefs_key_security_center_sidebar_line_color" /> + android:persistent="false" + android:title="@string/security_center_sidebar_line_color_dark" + android:key="prefs_key_security_center_sidebar_line_color_dark" + android:defaultValue="-6842473" + app:showAlphaSlider="true" + android:dependency="prefs_key_security_center_sidebar_line_color" /> + android:persistent="false" + android:title="@string/security_center_sidebar_line_color_light" + android:key="prefs_key_security_center_sidebar_line_color_light" + android:defaultValue="-872415232" + app:showAlphaSlider="true" + android:dependency="prefs_key_security_center_sidebar_line_color" /> + android:dependency="prefs_key_se_enable" /> + app:showAlphaSlider="true" /> @@ -191,7 +191,7 @@ android:key="prefs_key_security_center_skip_count_down_limit" android:title="@string/security_center_skip_waiting_time" android:defaultValue="false" - app:isPreferenceVisible="true"/> + app:isPreferenceVisible="true" /> + app:isPreferenceVisible="true" /> + app:isPreferenceVisible="true" /> - + \ No newline at end of file diff --git a/app/src/main/res/xml/settings_safe_mode.xml b/app/src/main/res/xml/settings_safe_mode.xml index c39de042ca..92b6dc4369 100644 --- a/app/src/main/res/xml/settings_safe_mode.xml +++ b/app/src/main/res/xml/settings_safe_mode.xml @@ -20,6 +20,6 @@ android:title="@string/various" android:key="prefs_key_other_safe_mode_enable" android:defaultValue="false" /> - + \ No newline at end of file diff --git a/app/src/main/res/xml/system_framework_freeform.xml b/app/src/main/res/xml/system_framework_freeform.xml index 5284a48f53..76c7c64899 100644 --- a/app/src/main/res/xml/system_framework_freeform.xml +++ b/app/src/main/res/xml/system_framework_freeform.xml @@ -28,7 +28,7 @@ + android:key="prefs_key_system_framework_freeform_bubble_title"> + android:title="@string/system_framework_freeform_jump" + android:summary="@string/system_framework_freeform_title_desc" + android:key="prefs_key_system_framework_freeform_jump" + android:defaultValue="false" /> + android:dependency="prefs_key_system_framework_freeform_jump" /> + android:dependency="prefs_key_system_framework_freeform_jump" /> + android:dependency="prefs_key_system_framework_freeform_jump" /> + android:dependency="prefs_key_system_framework_freeform_jump" /> diff --git a/app/src/main/res/xml/system_framework_other.xml b/app/src/main/res/xml/system_framework_other.xml index 92f488cb7a..1984cde5ba 100644 --- a/app/src/main/res/xml/system_framework_other.xml +++ b/app/src/main/res/xml/system_framework_other.xml @@ -14,9 +14,9 @@ android:defaultValue="false" /> + android:title="@string/system_framework_disable_72h_verify" + android:key="prefs_key_system_framework_disable_72h_verify" + android:defaultValue="false" /> + android:title="@string/system_framework_other_disable_cleaner" + android:summary="@string/system_framework_other_disable_cleaner_desc" + android:key="prefs_key_system_framework_other_disable_cleaner" + android:defaultValue="false" /> + android:title="@string/system_framework_allow_untrusted_touch" + android:key="prefs_key_system_framework_allow_untrusted_touch" + android:defaultValue="false" /> + android:title="@string/phone_double_5g_nr" + android:summary="@string/phone_double_5g_nr_desc" + android:key="prefs_key_phone_double_5g_nr" + android:defaultValue="false" /> + android:title="@string/phone_double_5g_sa" + android:summary="@string/phone_double_5g_sa_desc" + android:key="prefs_key_phone_double_5g_sa" + android:defaultValue="false" /> + android:title="@string/phone_n1" + android:summary="@string/phone_n1_desc" + android:key="prefs_key_phone_n1" + android:defaultValue="false" /> + android:title="@string/phone_n5_n8" + android:summary="@string/phone_n5_n8_desc" + android:key="prefs_key_phone_n5_n8" + android:defaultValue="false" /> + android:title="@string/phone_n28" + android:summary="@string/phone_n28_desc" + android:key="prefs_key_phone_n28" + android:defaultValue="false" /> diff --git a/app/src/main/res/xml/system_framework_volume.xml b/app/src/main/res/xml/system_framework_volume.xml index 1cf6d66cad..81b14cbb63 100644 --- a/app/src/main/res/xml/system_framework_volume.xml +++ b/app/src/main/res/xml/system_framework_volume.xml @@ -7,38 +7,38 @@ android:key="prefs_key_system_framework_default_volume_stream" app:entries="@array/default_volume_stream" app:entryValues="@array/default_volume_streame_value" - android:defaultValue="0"/> + android:defaultValue="0" /> + android:defaultValue="false" /> + android:defaultValue="false" /> + android:dependency="prefs_key_system_framework_volume_separate_control" /> + android:title="@string/system_framework_volume_disable_safe" + android:key="prefs_key_system_framework_volume_disable_safe" + android:defaultValue="false" /> + android:key="prefs_key_system_framework_volume_media_steps" + android:title="@string/system_framework_volume_media_steps" + android:summary="@string/system_framework_volume_media_steps_desc" + android:defaultValue="15" + app:maxValue="29" + app:minValue="15" + android:format="%s" + app:showSeekBarValue="true" /> - + app:isPreferenceVisible="false" /> + \ No newline at end of file diff --git a/app/src/main/res/xml/system_settings.xml b/app/src/main/res/xml/system_settings.xml index 4cae9fbdef..acb40d7bec 100644 --- a/app/src/main/res/xml/system_settings.xml +++ b/app/src/main/res/xml/system_settings.xml @@ -3,7 +3,7 @@ @@ -39,19 +39,19 @@ + android:title="@string/system_settings_ai_image_unlock_sr" + android:key="prefs_key_system_settings_ai_image_unlock_sr" + android:defaultValue="false" /> + android:title="@string/system_settings_ai_image_unlock_ai" + android:key="prefs_key_system_settings_ai_image_unlock_ai" + android:defaultValue="false" /> + android:title="@string/system_settings_ai_image_unlock_memc" + android:key="prefs_key_system_settings_ai_image_unlock_memc" + android:defaultValue="false" /> @@ -60,13 +60,13 @@ android:title="@string/system_settings_permission_show_app_up" android:key="prefs_key_system_settings_permission_show_app_up" android:summary="@string/system_settings_permission_show_app_up_desc" - android:defaultValue="false"/> + android:defaultValue="false" /> + android:title="@string/system_settings_permission_unknown_origin_app" + android:key="prefs_key_system_settings_permission_unknown_origin_app" + android:summary="@string/system_settings_permission_unknown_origin_app_desc" + android:defaultValue="false" /> @@ -74,12 +74,12 @@ android:title="@string/system_settings_develop_title" android:key="prefs_key_system_settings_develop_speed"> + android:title="@string/system_settings_develop_speed_mode" + android:key="prefs_key_system_settings_develop_speed_mode" + android:summary="@string/system_settings_develop_speed_mode_desc" + android:defaultValue="false" /> - + \ No newline at end of file diff --git a/app/src/main/res/xml/system_ui.xml b/app/src/main/res/xml/system_ui.xml index 038f1b7e87..ec8b891e2f 100644 --- a/app/src/main/res/xml/system_ui.xml +++ b/app/src/main/res/xml/system_ui.xml @@ -1,31 +1,31 @@ - + + android:targetClass="com.sevtinge.cemiuiler.ui.systemui.LockScreenActivity" /> - + - + - + + android:targetPackage="com.sevtinge.cemiuiler" + android:targetClass="com.sevtinge.cemiuiler.ui.systemui.NavigationActivity" /> - + diff --git a/app/src/main/res/xml/system_ui_control_center.xml b/app/src/main/res/xml/system_ui_control_center.xml index 71760dbf29..a31270bf23 100644 --- a/app/src/main/res/xml/system_ui_control_center.xml +++ b/app/src/main/res/xml/system_ui_control_center.xml @@ -1,19 +1,19 @@ + xmlns:app="http://schemas.android.com/apk/res-auto"> + android:key="prefs_key_system_ui_control_center_show_weather" + android:title="@string/system_ui_control_center_show_weather" + android:defaultValue="false" /> + android:key="prefs_key_system_ui_control_center_show_weather_city" + android:title="@string/system_ui_control_center_show_weather_city" + android:defaultValue="false" + android:dependency="prefs_key_system_ui_control_center_show_weather" /> @@ -89,64 +89,64 @@ android:defaultValue="false" /> + android:key="prefs_key_system_control_center_qs_detail_bg" + android:title="@string/system_control_center_qs_detail_bg" + android:defaultValue="0" + app:maxValue="255" + app:format="%d" + app:showSeekBarValue="true" /> + android:title="@string/system_ui_control_center_control_detail_background_alpha" + android:key="prefs_key_system_ui_control_center_control_detail_background_alpha" + android:defaultValue="255" + app:minValue="120" + app:maxValue="255" + app:format="%s" + app:showSeekBarValue="true" /> + android:defaultValue="0" + android:key="prefs_key_system_ui_control_center_mi_play_entry" + android:title="@string/system_ui_control_center_hide_mi_play_entry" + android:enabled="false" + app:entries="@array/status_bar_icon_mode" + app:entryValues="@array/status_bar_icon_mode_value" /> + android:defaultValue="0" + android:key="prefs_key_system_ui_control_center_mi_smart_hub_entry" + android:title="@string/system_ui_control_center_hide_mi_smart_hub_entry" + app:entries="@array/status_bar_icon_mode" + app:entryValues="@array/status_bar_icon_mode_value" /> + android:defaultValue="0" + android:key="prefs_key_system_ui_control_center_device_ctrl_entry" + android:title="@string/system_ui_control_center_hide_device_ctrl_entry" + app:entries="@array/status_bar_icon_mode" + app:entryValues="@array/status_bar_icon_mode_value" /> + android:title="@string/system_control_center_5g_tile" + android:key="prefs_key_system_control_center_5g_tile" + android:defaultValue="false" /> + android:title="@string/system_control_center_qs_tile_label" + android:key="prefs_key_system_control_center_qs_tile_label" + android:defaultValue="false" /> + android:defaultValue="false" /> + app:showSeekBarValue="true" /> + app:showSeekBarValue="true" /> - + @@ -29,16 +28,16 @@ android:title="@string/system_ui_lock_screen_show_charging_cv" /> + android:defaultValue="false" + android:key="prefs_key_system_ui_show_charging_c_more" + android:title="@string/system_ui_lock_screen_show_charging_c_more" + android:dependency="prefs_key_system_ui_lock_screen_show_charging_cv" /> + android:defaultValue="false" + android:key="prefs_key_system_ui_show_charging_v_more" + android:title="@string/system_ui_lock_screen_show_charging_v_more" + android:dependency="prefs_key_system_ui_lock_screen_show_charging_cv" /> + xmlns:app="http://schemas.android.com/apk/res-auto"> + android:title="@string/system_ui_navigation_custom" + android:key="prefs_key_system_ui_navigation_custom" + android:defaultValue="false" + android:enabled="false" /> + android:title="@string/system_ui_navigation_custom_height" + android:key="prefs_key_system_ui_navigation_custom_height" + app:maxValue="1000" + app:minValue="1" + app:displayDividerValue="10" + app:format="%s dp" + app:stepValue="1" + app:showSeekBarValue="true" + android:dependency="prefs_key_system_ui_navigation_custom" /> + android:title="@string/system_ui_navigation_custom_height_land" + android:key="prefs_key_system_ui_navigation_custom_height_land" + app:maxValue="1000" + app:minValue="1" + app:displayDividerValue="10" + app:format="%s dp" + app:stepValue="1" + app:showSeekBarValue="true" + android:dependency="prefs_key_system_ui_navigation_custom" /> + android:title="@string/system_ui_navigation_frame_custom_height" + android:key="prefs_key_system_ui_navigation_frame_custom_height" + app:maxValue="1000" + app:minValue="1" + app:displayDividerValue="10" + app:format="%s dp" + app:stepValue="1" + app:showSeekBarValue="true" + android:dependency="prefs_key_system_ui_navigation_custom" /> + android:title="@string/system_ui_navigation_frame_custom_height_land" + android:key="prefs_key_system_ui_navigation_frame_custom_height_land" + app:maxValue="1000" + app:minValue="1" + app:displayDividerValue="10" + app:format="%s dp" + app:stepValue="1" + app:showSeekBarValue="true" + android:dependency="prefs_key_system_ui_navigation_custom" /> + android:title="@string/system_ui_navigation_handle_custom" + android:key="prefs_key_system_ui_navigation_handle_custom" + android:defaultValue="false" /> + android:title="@string/system_ui_navigation_handle_custom_thickness" + app:defaultValueText="@string/array_default" + android:key="prefs_key_system_ui_navigation_handle_custom_thickness" + android:defaultValue="185" + app:maxValue="500" + app:minValue="0" + app:displayDividerValue="100" + app:format="%s dp" + app:stepValue="5" + app:showSeekBarValue="true" + android:dependency="prefs_key_system_ui_navigation_handle_custom" /> + android:title="@string/system_ui_navigation_handle_custom_height" + app:defaultValueText="@string/array_default" + android:key="prefs_key_system_ui_navigation_handle_custom_height" + android:defaultValue="600" + app:maxValue="1000" + app:minValue="0" + app:displayDividerValue="10" + app:format="%s dp" + app:stepValue="5" + app:showSeekBarValue="true" + android:enabled="false" + android:dependency="prefs_key_system_ui_navigation_handle_custom" /> + android:title="@string/system_ui_navigation_handle_custom_width" + android:key="prefs_key_system_ui_navigation_handle_custom_width" + android:defaultValue="145" + app:maxValue="400" + app:minValue="0" + android:format="%d dp" + app:showSeekBarValue="true" + android:enabled="false" + android:dependency="prefs_key_system_ui_navigation_handle_custom" /> + android:title="@string/system_ui_navigation_handle_custom_width_land" + android:key="prefs_key_system_ui_navigation_handle_custom_width_land" + android:defaultValue="254" + app:maxValue="600" + app:minValue="0" + android:format="%d dp" + app:showSeekBarValue="true" + android:enabled="false" + android:dependency="prefs_key_system_ui_navigation_handle_custom" /> + android:persistent="false" + android:title="@string/system_ui_navigation_handle_custom_color_dark" + android:key="prefs_key_system_ui_navigation_handle_custom_color_dark" + android:defaultValue="-1" + app:showAlphaSlider="true" + android:dependency="prefs_key_system_ui_navigation_handle_custom" /> + android:persistent="false" + android:title="@string/system_ui_navigation_handle_custom_color" + android:key="prefs_key_system_ui_navigation_handle_custom_color" + android:defaultValue="-872415232" + app:showAlphaSlider="true" + android:dependency="prefs_key_system_ui_navigation_handle_custom" /> diff --git a/app/src/main/res/xml/system_ui_other.xml b/app/src/main/res/xml/system_ui_other.xml index e0b2a96661..66cd9dd306 100644 --- a/app/src/main/res/xml/system_ui_other.xml +++ b/app/src/main/res/xml/system_ui_other.xml @@ -2,8 +2,7 @@ - + - + + android:defaultValue="false" + android:key="prefs_key_system_ui_other_notification_fix" + android:title="@string/system_ui_other_notification_fix" /> - + - + \ No newline at end of file diff --git a/app/src/main/res/xml/system_ui_plugin.xml b/app/src/main/res/xml/system_ui_plugin.xml index 31d9b9c907..656913f551 100644 --- a/app/src/main/res/xml/system_ui_plugin.xml +++ b/app/src/main/res/xml/system_ui_plugin.xml @@ -4,13 +4,13 @@ + android:title="@string/system_ui_plugin_enable_volume_blur" + android:summary="@string/system_ui_plugin_enable_volume_blur_desc" + android:key="prefs_key_system_ui_plugin_enable_volume_blur" + android:defaultValue="false" /> - + \ No newline at end of file diff --git a/app/src/main/res/xml/system_ui_status_bar.xml b/app/src/main/res/xml/system_ui_status_bar.xml index 917ac18765..6594c37eef 100644 --- a/app/src/main/res/xml/system_ui_status_bar.xml +++ b/app/src/main/res/xml/system_ui_status_bar.xml @@ -4,28 +4,28 @@ + android:targetClass="com.sevtinge.cemiuiler.ui.systemui.statusbar.IconManageActivity" + android:targetPackage="com.sevtinge.cemiuiler" /> + android:targetClass="com.sevtinge.cemiuiler.ui.systemui.statusbar.NetworkSpeedIndicatorActivity" + android:targetPackage="com.sevtinge.cemiuiler" /> + android:targetClass="com.sevtinge.cemiuiler.ui.systemui.statusbar.ClockIndicatorActivity" + android:targetPackage="com.sevtinge.cemiuiler" /> + android:title="@string/system_ui_statusbar_device_title" + android:key="prefs_key_system_ui_status_bar_device"> + android:targetClass="com.sevtinge.cemiuiler.ui.systemui.statusbar.BatteryDetailIndicatorActivity" + android:targetPackage="com.sevtinge.cemiuiler" /> @@ -33,7 +33,7 @@ android:defaultValue="false" android:key="pref_key_system_ui_statusbar_layout_compatibility_mode" android:title="@string/system_ui_statusbar_layout_compatibility_mode_title" - android:summary="@string/system_ui_statusbar_layout_compatibility_mode_desc"/> + android:summary="@string/system_ui_statusbar_layout_compatibility_mode_desc" /> + android:title="@string/system_ui_status_bar_double_tap_to_sleep" + android:key="prefs_key_system_ui_status_bar_double_tap_to_sleep" + android:defaultValue="false" /> + android:title="@string/system_ui_status_bar_hide_icon" + android:key="prefs_key_system_ui_status_bar_hide_icon" + android:defaultValue="false" /> - + \ No newline at end of file diff --git a/app/src/main/res/xml/system_ui_status_bar_battery_indicator.xml b/app/src/main/res/xml/system_ui_status_bar_battery_indicator.xml index 26fdb136cb..10d70ea764 100644 --- a/app/src/main/res/xml/system_ui_status_bar_battery_indicator.xml +++ b/app/src/main/res/xml/system_ui_status_bar_battery_indicator.xml @@ -5,7 +5,7 @@ + android:defaultValue="false" /> @@ -29,14 +29,14 @@ android:key="prefs_key_system_ui_status_bar_battery_indicator_align" app:entries="@array/battery_indicator_align" app:entryValues="@array/battery_indicator_align_value" - android:defaultValue="0"/> + android:defaultValue="0" /> + android:defaultValue="0" /> + app:colorShape="circle" /> + app:colorShape="circle" /> + app:colorShape="circle" /> + app:colorShape="circle" /> + android:format="%d px" /> + android:format="%d%%" /> + android:format="%d%%" /> + android:format="%d%%" /> + android:format="%d%%" /> + android:title="@string/system_ui_status_bar_battery_indicator_test" /> - + \ No newline at end of file diff --git a/app/src/main/res/xml/system_ui_status_bar_clock_indicator.xml b/app/src/main/res/xml/system_ui_status_bar_clock_indicator.xml index 66e6cc5e48..023d5777df 100644 --- a/app/src/main/res/xml/system_ui_status_bar_clock_indicator.xml +++ b/app/src/main/res/xml/system_ui_status_bar_clock_indicator.xml @@ -1,7 +1,7 @@ - + + app:negativeShift="8" /> \ No newline at end of file diff --git a/app/src/main/res/xml/system_ui_status_bar_mobile_network_type.xml b/app/src/main/res/xml/system_ui_status_bar_mobile_network_type.xml index 2d6f8fd7de..ed3655168e 100644 --- a/app/src/main/res/xml/system_ui_status_bar_mobile_network_type.xml +++ b/app/src/main/res/xml/system_ui_status_bar_mobile_network_type.xml @@ -73,6 +73,6 @@ app:maxValue="16" app:minValue="0" app:stepValue="1" - app:negativeShift="8"/> + app:negativeShift="8" /> \ No newline at end of file diff --git a/app/src/main/res/xml/theme_manager.xml b/app/src/main/res/xml/theme_manager.xml index 50865bcb14..1eb0a1f0a4 100644 --- a/app/src/main/res/xml/theme_manager.xml +++ b/app/src/main/res/xml/theme_manager.xml @@ -4,7 +4,7 @@ + app:isPreferenceVisible="false"> + android:defaultValue="false" /> @@ -32,15 +32,15 @@ + android:defaultValue="false" /> + android:defaultValue="false" /> - + \ No newline at end of file diff --git a/app/src/main/res/xml/tsmclient.xml b/app/src/main/res/xml/tsmclient.xml index 52189a7838..06a8af820d 100644 --- a/app/src/main/res/xml/tsmclient.xml +++ b/app/src/main/res/xml/tsmclient.xml @@ -1,11 +1,11 @@ + android:title="@string/tsmclient_auto_nfc" + android:summary="@string/tsmclient_auto_nfc_desc" + android:key="prefs_key_tsmclient_auto_nfc" + android:defaultValue="false" /> - + \ No newline at end of file diff --git a/app/src/main/res/xml/updater.xml b/app/src/main/res/xml/updater.xml index 54bb6a4af6..99dc4b7f0c 100644 --- a/app/src/main/res/xml/updater.xml +++ b/app/src/main/res/xml/updater.xml @@ -1,24 +1,24 @@ + xmlns:app="http://schemas.android.com/apk/res-auto"> + android:title="@string/updater_fuck_vab" + android:summary="@string/updater_fuck_vab_desc" + android:key="prefs_key_updater_fuck_vab" + android:defaultValue="false" /> + android:title="@string/updater_miui_version" + android:summary="@string/updater_miui_version_desc" + android:key="prefs_key_various_updater_miui_version" /> + android:title="@string/updater_device" + android:summary="@string/updater_device_desc" + android:key="prefs_key_updater_device" + app:isPreferenceVisible="true" /> - + \ No newline at end of file diff --git a/app/src/main/res/xml/various.xml b/app/src/main/res/xml/various.xml index 9e86f1006a..7ffccf8173 100644 --- a/app/src/main/res/xml/various.xml +++ b/app/src/main/res/xml/various.xml @@ -1,18 +1,19 @@ + xmlns:app="http://schemas.android.com/apk/res-auto"> - + + android:targetPackage="com.sevtinge.cemiuiler" + android:targetClass="com.sevtinge.cemiuiler.ui.various.LocationSimulationActivity" /> @@ -57,15 +58,15 @@ android:defaultValue="false" /> + android:key="prefs_key_various_collapse_miui_title" + android:title="@string/various_collapse_miui_title" + android:summary="@string/various_collapse_miui_title_desc" + android:defaultValue="0" + app:entries="@array/collapse_miui_title" + app:entryValues="@array/collapse_miui_title_value" /> - + \ No newline at end of file diff --git a/app/src/main/res/xml/various_background.xml b/app/src/main/res/xml/various_background.xml index 781c8e77bf..bfd1b8c9d6 100644 --- a/app/src/main/res/xml/various_background.xml +++ b/app/src/main/res/xml/various_background.xml @@ -8,7 +8,7 @@ android:persistent="false" android:title="@string/custom_background_blur_enabled" android:key="prefs_key_custom_background_blur_enabled" - android:defaultValue="false"/> + android:defaultValue="false" /> + android:dependency="prefs_key_custom_background_blur_enabled" /> @@ -29,7 +29,7 @@ android:title="@string/custom_background_color" android:key="prefs_key_custom_background_color" android:defaultValue="2113929215" - app:showAlphaSlider="true"/> + app:showAlphaSlider="true" /> + app:showSeekBarValue="true" /> + app:showSeekBarValue="true" /> - + \ No newline at end of file diff --git a/app/src/main/res/xml/various_dialog.xml b/app/src/main/res/xml/various_dialog.xml index 6df556ba88..465cd0adef 100644 --- a/app/src/main/res/xml/various_dialog.xml +++ b/app/src/main/res/xml/various_dialog.xml @@ -6,7 +6,7 @@ android:title="@string/various_dialog_gravity" android:defaultValue="0" app:entries="@array/dialog_gravity" - app:entryValues="@array/dialog_gravity_value"/> + app:entryValues="@array/dialog_gravity_value" /> + app:showSeekBarValue="true" /> + app:showSeekBarValue="true" /> + android:defaultValue="false" /> + android:dependency="prefs_key_various_dialog_window_blur" /> - + \ No newline at end of file diff --git a/app/src/main/res/xml/various_location_simulation.xml b/app/src/main/res/xml/various_location_simulation.xml index 04438fc937..b607e91562 100644 --- a/app/src/main/res/xml/various_location_simulation.xml +++ b/app/src/main/res/xml/various_location_simulation.xml @@ -5,7 +5,7 @@ + android:key="prefs_key_location_simulation_package_name" /> + android:key="prefs_key_location_simulation_package_name2" /> + android:key="prefs_key_location_simulation_package_name3" /> - + \ No newline at end of file diff --git a/app/src/main/res/xml/weather.xml b/app/src/main/res/xml/weather.xml index 22119dee9f..99432fcfc6 100644 --- a/app/src/main/res/xml/weather.xml +++ b/app/src/main/res/xml/weather.xml @@ -1,9 +1,9 @@ + xmlns:app="http://schemas.android.com/apk/res-auto"> - - + \ No newline at end of file diff --git a/hidden-api/src/main/java/com/android/internal/graphics/drawable/BackgroundBlurDrawable.java b/hidden-api/src/main/java/com/android/internal/graphics/drawable/BackgroundBlurDrawable.java index 94228f3453..c10362a404 100644 --- a/hidden-api/src/main/java/com/android/internal/graphics/drawable/BackgroundBlurDrawable.java +++ b/hidden-api/src/main/java/com/android/internal/graphics/drawable/BackgroundBlurDrawable.java @@ -6,4 +6,5 @@ import androidx.annotation.RequiresApi; @RequiresApi(Build.VERSION_CODES.S) -public abstract class BackgroundBlurDrawable extends Drawable { } \ No newline at end of file +public abstract class BackgroundBlurDrawable extends Drawable { +}