Skip to content

Commit 074b8d9

Browse files
committed
add storage protection, update guide, enable obfuscate
1 parent b8f8d89 commit 074b8d9

File tree

7 files changed

+27
-8
lines changed

7 files changed

+27
-8
lines changed

Diff for: Guide.md

+5-6
Original file line numberDiff line numberDiff line change
@@ -1093,16 +1093,15 @@ API31及以上弃用,请使用[密码复杂度要求](#密码复杂度要求)
10931093

10941094
### 动态取色
10951095

1096-
需要安卓12或以上
1096+
需要安卓12或以上,打开后OwnDroid中的颜色方案将会跟随系统
10971097

1098-
在安卓12或以上此功能默认打开
1098+
### 锁定OwnDroid
10991099

1100-
打开后OwnDroid中的颜色方案将会跟随系统
1100+
打开OwnDroid时要求使用锁屏密码或生物识别进行验证
11011101

1102-
建议打开,因为自带的颜色方案不好看
1103-
1104-
打开或关闭此功能都要重启OwnDroid
1102+
可以选择冷启动或热启动时要求验证
11051103

1104+
建议打开保护存储空间,以防止OwnDroid的存储空间被清除
11061105

11071106
## 构建
11081107

Diff for: app/build.gradle.kts

-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ android {
2828

2929
buildTypes {
3030
release {
31-
//project.gradle.startParameter.excludedTaskNames.add("lint")
3231
isMinifyEnabled = true
3332
isShrinkResources = true
3433
proguardFiles(

Diff for: app/proguard-rules.pro

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# For more details, see
66
# http://developer.android.com/guide/developing/tools/proguard.html
77

8-
-dontobfuscate
8+
# -dontobfuscate
99
# If your project uses WebView with JS, uncomment the following
1010
# and specify the fully qualified class name to the JavaScript interface
1111
# class:

Diff for: app/src/main/AndroidManifest.xml

+6
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
android:theme="@style/Theme.OwnDroid"
3030
android:enableOnBackInvokedCallback="true"
3131
android:testOnly="false"
32+
android:manageSpaceActivity=".ManageSpaceActivity"
3233
tools:targetApi="34">
3334
<activity
3435
android:name=".MainActivity"
@@ -45,6 +46,11 @@
4546
<category android:name="android.intent.category.LAUNCHER" />
4647
</intent-filter>
4748
</activity>
49+
<activity
50+
android:name=".ManageSpaceActivity"
51+
android:windowSoftInputMode="adjustResize|stateHidden"
52+
android:theme="@style/Theme.OwnDroid">
53+
</activity>
4854
<receiver
4955
android:name=".Receiver"
5056
android:description="@string/app_name"

Diff for: app/src/main/java/com/bintianqi/owndroid/Setting.kt

+5
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,11 @@ private fun AuthSettings(){
117117
{ sharedPref.edit().putBoolean("lock_in_background",it).apply() }
118118
)
119119
}
120+
SwitchItem(
121+
R.string.protect_storage, "", null,
122+
{ sharedPref.getBoolean("protect_storage",false) },
123+
{ sharedPref.edit().putBoolean("protect_storage",it).apply() }
124+
)
120125
Box(modifier = Modifier.padding(horizontal = 8.dp)){
121126
Information {
122127
Text(text = stringResource(R.string.auth_on_start))

Diff for: app/src/main/res/values-zh-rCN/strings.xml

+5
Original file line numberDiff line numberDiff line change
@@ -492,6 +492,11 @@
492492
<string name="auth_with_password">使用密码进行验证</string>
493493
<string name="auth_with_bio">使用生物识别进行验证</string>
494494
<string name="lock_in_background">处于后台时锁定</string>
495+
<string name="protect_storage">保护存储空间</string>
496+
<string name="storage_is_protected">存储空间受到保护</string>
497+
<string name="you_cant_clear_storage">你不能清除OwnDroid的存储空间</string>
498+
<string name="clear_storage">清除存储空间</string>
499+
<string name="clear_storage_success">清除存储空间成功\n应用即将退出</string>
495500

496501
<!--AndroidPermission-->
497502
<string name="permission_READ_EXTERNAL_STORAGE">读取外部存储</string>

Diff for: app/src/main/res/values/strings.xml

+5
Original file line numberDiff line numberDiff line change
@@ -507,6 +507,11 @@
507507
<string name="auth_with_password">Authenticate OwnDroid with password</string>
508508
<string name="auth_with_bio">Authenticate OwnDroid with biometrics</string>
509509
<string name="lock_in_background">Lock when switch to background</string>
510+
<string name="protect_storage">Protect storage</string>
511+
<string name="storage_is_protected">Storage is protected</string>
512+
<string name="you_cant_clear_storage">You can\'t clear storage of OwnDroid</string>
513+
<string name="clear_storage">Clear storage</string>
514+
<string name="clear_storage_success">Clear storage success\nApplication will exit</string>
510515

511516
<!--AndroidPermission-->
512517
<string name="permission_READ_EXTERNAL_STORAGE">Read external storage</string>

0 commit comments

Comments
 (0)