Skip to content

Commit

Permalink
智能隐私打码
Browse files Browse the repository at this point in the history
  • Loading branch information
hosizoraru committed Sep 25, 2023
1 parent 4156a14 commit cd837e5
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@ class ScreenShotPage : BasePage() {
),
SwitchV("save_as_png", false)
)
TextSummaryWithSwitch(
TextSummaryV(
textId = R.string.privacy_mosaic,
),
SwitchV("privacy_mosaic", false)
)
val deviceBinding = GetDataBinding({
safeSP.getBoolean(
"device_shell",
Expand Down
2 changes: 2 additions & 0 deletions app/src/main/kotlin/star/sky/voyager/hook/apps/ScreenShot.kt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import de.robv.android.xposed.callbacks.XC_LoadPackage
import star.sky.voyager.hook.hooks.mediaeditor.UnlockUnlimitedCropping
import star.sky.voyager.hook.hooks.multipackage.SuperClipboard
import star.sky.voyager.hook.hooks.screenshot.DeviceShell
import star.sky.voyager.hook.hooks.screenshot.PrivacyMosaic
import star.sky.voyager.hook.hooks.screenshot.SaveAsPng
import star.sky.voyager.hook.hooks.screenshot.SaveToPictures
import star.sky.voyager.utils.init.AppRegister
Expand All @@ -18,6 +19,7 @@ object ScreenShot : AppRegister() {
SuperClipboard,
SaveToPictures, // 截图保存到 Pictures/Screenshots
SaveAsPng, // 截图格式为 PNG
PrivacyMosaic, // 智能隐私打码
// Scroll,
DeviceShell,
)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package star.sky.voyager.hook.hooks.screenshot

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 star.sky.voyager.utils.init.HookRegister
import star.sky.voyager.utils.key.hasEnable

object PrivacyMosaic : HookRegister() {
override fun init() = hasEnable("privacy_mosaic") {
loadClass("com.miui.gallery.editor.photo.screen.mosaic.ScreenMosaicView")
.methodFinder().filterByName("isSupportPrivacyMarking")
.first().createHook {
returnConstant(true)
}
}
}
1 change: 1 addition & 0 deletions app/src/main/res/values-ja-rJP/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -471,6 +471,7 @@
<string name="save_to_pictures">スクリーンショットは Pictures/Screenshots に保存されます</string>
<string name="save_as_png">PNG形式でスクリーンショットを保存する</string>
<string name="device_shell">カスタムシェル付きのスクリーンショット機種</string>
<string name="privacy_mosaic">スマートプライバシーモザイク</string>

<string name="Market_As">デバイスを偽装:</string>
<string name="device_market">商店提供モデル</string>
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/values-zh-rCN/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -471,6 +471,7 @@
<string name="save_to_pictures">截图保存到 \nPictures/Screenshots</string>
<string name="save_as_png">截图格式为 PNG</string>
<string name="device_shell">自定义带壳截图的机型</string>
<string name="privacy_mosaic">智能隐私打码</string>

<string name="Market_As">伪装机型为:</string>
<string name="device_market">商店推送的机型</string>
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -472,6 +472,7 @@
<string name="save_to_pictures">Save screenshots to \nPictures/Screenshots</string>
<string name="save_as_png">Save screenshots as PNG</string>
<string name="device_shell">Customize device with shell for screenshots</string>
<string name="privacy_mosaic">Intelligent Privacy Mosaic</string>

<string name="Market_As">Disguise your model as what in the GetApps</string>
<string name="device_market">Device Market Models</string>
Expand Down

0 comments on commit cd837e5

Please sign in to comment.