Skip to content

Commit

Permalink
Fix permission
Browse files Browse the repository at this point in the history
  • Loading branch information
ismartcoding committed Jan 16, 2024
1 parent b67ae6c commit 0a99ed0
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 16 deletions.
1 change: 0 additions & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
<uses-permission android:name="android.permission.CALL_PHONE" />
<uses-permission android:name="android.permission.REQUEST_DELETE_PACKAGES" />
<uses-permission android:name="android.permission.QUERY_ALL_PACKAGES" tools:ignore="QueryAllPackagesPermission" />
<uses-permission android:name="android.permission.QUERY_ALL_PACKAGES" tools:ignore="QueryAllPackagesPermission" />
<uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE" tools:ignore="ScopedStorage" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" android:maxSdkVersion="29" tools:ignore="ScopedStorage" />
<uses-permission android:name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ object FileSystemHelper {

if (!rawSecondaryStoragesStr.isNullOrEmpty()) {
val rawSecondaryStorages =
rawSecondaryStoragesStr!!.split(
rawSecondaryStoragesStr.split(
File.pathSeparator.toRegex(),
).dropLastWhile(String::isEmpty).toTypedArray()
Collections.addAll(paths, *rawSecondaryStorages)
Expand Down Expand Up @@ -304,12 +304,6 @@ object FileSystemHelper {

return items.take(50)
}

private fun parseFilePermission(f: File): String {
val attributes = Files.readAttributes(f.toPath(), PosixFileAttributes::class.java, LinkOption.NOFOLLOW_LINKS)
val p = attributes.permissions()
return ""
}
}

fun List<DFile>.sort(sortBy: FileSortBy): List<DFile> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ object LocaleHelper {

fun getString(resourceKey: Int): String {
return try {
MainApp.instance.resources.getString(resourceKey) ?: ""
MainApp.instance.resources.getString(resourceKey)
} catch (e: Exception) {
resourceKey.toString()
}
Expand Down Expand Up @@ -57,7 +57,7 @@ object LocaleHelper {
val params: MutableMap<String, Any> = HashMap()
var i = 0
while (i < formatArguments.size) {
params[formatArguments[i].toString()] = (formatArguments[i + 1] ?: "")
params[formatArguments[i].toString()] = formatArguments[i + 1]
i += 2
}
tmpl.execute(params)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,7 @@ class TextEditorDialog(val uri: Uri) : BaseDialog<DialogTextEditorBinding>() {
setWindowSoftInput(binding.editor)

lifecycleScope.launch {
var text = ""
text =
val text =
if (uri.scheme == ContentResolver.SCHEME_CONTENT) {
val context = requireContext()
withIO {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ class WebConsoleViewModel : ViewModel() {

fun dig(
context: Context,
httpPort: Int,
) {
viewModelScope.launch {
val client = HttpClientManager.httpClient()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ fun WebSettingsPage(
})
DropdownMenuItem(onClick = {
isMenuOpen = false
viewModel.dig(context, httpPort = httpPort)
viewModel.dig(context)
}, text = {
Text(text = stringResource(R.string.http_server_diagnostics))
})
Expand Down
4 changes: 2 additions & 2 deletions lib/src/main/java/com/ismartcoding/lib/mustache/Mustache.kt
Original file line number Diff line number Diff line change
Expand Up @@ -755,7 +755,7 @@ object Mustache {
delims: Delims,
into: StringBuilder,
) {
delims.addTag('^', _name, into!!)
delims.addTag('^', _name, into)
for (seg in _segs) seg.decompile(delims, into)
delims.addTag('/', _name, into)
}
Expand Down Expand Up @@ -843,7 +843,7 @@ object Mustache {
into: StringBuilder,
) {} // nada

override fun visit(visit: Visitor) {}
override fun visit(visitor: Visitor) {}

override fun toString(): String {
return "Faux"
Expand Down

0 comments on commit 0a99ed0

Please sign in to comment.