add storage protection, update guide, enable obfuscate

This commit is contained in:
BinTianqi
2024-05-17 19:09:28 +08:00
parent b8f8d8956a
commit 074b8d919b
7 changed files with 27 additions and 8 deletions

View File

@@ -1093,16 +1093,15 @@ API31及以上弃用请使用[密码复杂度要求](#密码复杂度要求)
### 动态取色
需要安卓12或以上
需要安卓12或以上打开后OwnDroid中的颜色方案将会跟随系统
在安卓12或以上此功能默认打开
### 锁定OwnDroid
打开OwnDroid中的颜色方案将会跟随系统
打开OwnDroid时要求使用锁屏密码或生物识别进行验证
建议打开,因为自带的颜色方案不好看
打开或关闭此功能都要重启OwnDroid
可以选择冷启动或热启动时要求验证
建议打开保护存储空间以防止OwnDroid的存储空间被清除
## 构建

View File

@@ -28,7 +28,6 @@ android {
buildTypes {
release {
//project.gradle.startParameter.excludedTaskNames.add("lint")
isMinifyEnabled = true
isShrinkResources = true
proguardFiles(

View File

@@ -5,7 +5,7 @@
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
-dontobfuscate
# -dontobfuscate
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:

View File

@@ -29,6 +29,7 @@
android:theme="@style/Theme.OwnDroid"
android:enableOnBackInvokedCallback="true"
android:testOnly="false"
android:manageSpaceActivity=".ManageSpaceActivity"
tools:targetApi="34">
<activity
android:name=".MainActivity"
@@ -45,6 +46,11 @@
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".ManageSpaceActivity"
android:windowSoftInputMode="adjustResize|stateHidden"
android:theme="@style/Theme.OwnDroid">
</activity>
<receiver
android:name=".Receiver"
android:description="@string/app_name"

View File

@@ -117,6 +117,11 @@ private fun AuthSettings(){
{ sharedPref.edit().putBoolean("lock_in_background",it).apply() }
)
}
SwitchItem(
R.string.protect_storage, "", null,
{ sharedPref.getBoolean("protect_storage",false) },
{ sharedPref.edit().putBoolean("protect_storage",it).apply() }
)
Box(modifier = Modifier.padding(horizontal = 8.dp)){
Information {
Text(text = stringResource(R.string.auth_on_start))

View File

@@ -492,6 +492,11 @@
<string name="auth_with_password">使用密码进行验证</string>
<string name="auth_with_bio">使用生物识别进行验证</string>
<string name="lock_in_background">处于后台时锁定</string>
<string name="protect_storage">保护存储空间</string>
<string name="storage_is_protected">存储空间受到保护</string>
<string name="you_cant_clear_storage">你不能清除OwnDroid的存储空间</string>
<string name="clear_storage">清除存储空间</string>
<string name="clear_storage_success">清除存储空间成功\n应用即将退出</string>
<!--AndroidPermission-->
<string name="permission_READ_EXTERNAL_STORAGE">读取外部存储</string>

View File

@@ -507,6 +507,11 @@
<string name="auth_with_password">Authenticate OwnDroid with password</string>
<string name="auth_with_bio">Authenticate OwnDroid with biometrics</string>
<string name="lock_in_background">Lock when switch to background</string>
<string name="protect_storage">Protect storage</string>
<string name="storage_is_protected">Storage is protected</string>
<string name="you_cant_clear_storage">You can\'t clear storage of OwnDroid</string>
<string name="clear_storage">Clear storage</string>
<string name="clear_storage_success">Clear storage success\nApplication will exit</string>
<!--AndroidPermission-->
<string name="permission_READ_EXTERNAL_STORAGE">Read external storage</string>