Skip to content

Commit

Permalink
feat: 快速赋予预编译文件权限
Browse files Browse the repository at this point in the history
* #79

Change-Id: I4a4dece265a058599a8e2ef37b1df2a23f6f3669
  • Loading branch information
XayahSuSuSu committed Feb 8, 2023
1 parent 945f5b0 commit 6d3128f
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package com.xayah.databackup.compose.ui.activity.guide.components

import android.Manifest
import android.content.ClipData
import android.content.ClipboardManager
import android.content.Context
import android.content.Intent
import android.net.Uri
Expand Down Expand Up @@ -258,6 +260,21 @@ fun Env(onPass: () -> Unit) {
Text(stringResource(id = R.string.confirm))
}
},
dismissButton = {
TextButton(
onClick = {
(context.getSystemService(Context.CLIPBOARD_SERVICE) as ClipboardManager).setPrimaryClip(
ClipData.newPlainText(
"PermissionCmd",
"su; chmod 777 /data/data/com.xayah.databackup/files/bin/*"
)
)
setPermissionDialog(false)
}
) {
Text(stringResource(R.string.copy_grant_command))
}
},
properties = DialogProperties(dismissOnBackPress = false, dismissOnClickOutside = false)
)
}
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/values-ru/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -157,4 +157,5 @@
<string name="read_icon_title">Icon reading requires a lot of memory, if you experience crashes during restoring, try turning this option off</string>
<string name="app_crashed">App crashed</string>
<string name="cancelling">Cancelling</string>
<string name="copy_grant_command">Copy grant command</string>
</resources>
1 change: 1 addition & 0 deletions app/src/main/res/values-uk/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -157,4 +157,5 @@
<string name="read_icon_title">Icon reading requires a lot of memory, if you experience crashes during restoring, try turning this option off</string>
<string name="app_crashed">App crashed</string>
<string name="cancelling">Cancelling</string>
<string name="copy_grant_command">Copy grant command</string>
</resources>
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 @@ -157,4 +157,5 @@
<string name="read_icon_title">图标读取需要大量的内存,如果您在恢复过程中遇到崩溃问题,请尝试关闭此选项</string>
<string name="app_crashed">应用发生崩溃</string>
<string name="cancelling">正在取消</string>
<string name="copy_grant_command">复制授权命令</string>
</resources>
1 change: 1 addition & 0 deletions app/src/main/res/values-zh-rHK/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -157,4 +157,5 @@
<string name="read_icon_title">圖標讀取需要大量的內存,如果您在恢復過程中遇到崩潰問題,請嘗試關閉此選項</string>
<string name="app_crashed">應用發生崩潰</string>
<string name="cancelling">正在取消</string>
<string name="copy_grant_command">複製授權命令</string>
</resources>
1 change: 1 addition & 0 deletions app/src/main/res/values-zh-rTW/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -157,4 +157,5 @@
<string name="read_icon_title">圖示讀取需要大量的記憶體,如果您在恢復過程中遇到崩潰問題,請嘗試關閉此選項</string>
<string name="app_crashed">應用發生崩潰</string>
<string name="cancelling">正在取消</string>
<string name="copy_grant_command">複製授權命令</string>
</resources>
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 @@ -175,6 +175,7 @@
<string name="read_icon_title">Icon reading requires a lot of memory, if you experience crashes during restoring, try turning this option off</string>
<string name="app_crashed">App crashed</string>
<string name="cancelling">Cancelling</string>
<string name="copy_grant_command">Copy grant command</string>
<string-array name="rclone_config_type_array_key" translatable="false">
<item>FTP</item>
<item>WebDAV</item>
Expand Down

0 comments on commit 6d3128f

Please sign in to comment.