Skip to content

Commit

Permalink
add storage protection, update guide, enable obfuscate
Browse files Browse the repository at this point in the history
  • Loading branch information
BinTianqi committed May 17, 2024
1 parent b8f8d89 commit 074b8d9
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 8 deletions.
11 changes: 5 additions & 6 deletions Guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -1093,16 +1093,15 @@ API31及以上弃用,请使用[密码复杂度要求](#密码复杂度要求)

### 动态取色

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

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

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

建议打开,因为自带的颜色方案不好看

打开或关闭此功能都要重启OwnDroid
可以选择冷启动或热启动时要求验证

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

## 构建

Expand Down
1 change: 0 additions & 1 deletion app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ android {

buildTypes {
release {
//project.gradle.startParameter.excludedTaskNames.add("lint")
isMinifyEnabled = true
isShrinkResources = true
proguardFiles(
Expand Down
2 changes: 1 addition & 1 deletion app/proguard-rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
6 changes: 6 additions & 0 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"
Expand Down
5 changes: 5 additions & 0 deletions app/src/main/java/com/bintianqi/owndroid/Setting.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
5 changes: 5 additions & 0 deletions app/src/main/res/values-zh-rCN/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
5 changes: 5 additions & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down

0 comments on commit 074b8d9

Please sign in to comment.