diff options
| author | Christophe Besson <cbesson@gmail.com> | 2026-10-10 17:09:12 +0200 |
|---|---|---|
| committer | Christophe Besson <cbesson@gmail.com> | 2026-10-10 17:09:12 +0200 |
| commit | b39e73cbb279ab0274e8cd0b84304a602fe1d5ef (patch) | |
| tree | 91e86b70289f5c0252372f4f05b83b38f049c64f /packages/meshbay-android/app/src/main/kotlin/org/meshbay/client/phonesync/DocChannels.kt | |
| parent | ff982773308d042e4ec68fae9cad5c5742bc7395 (diff) | |
| download | meshbay-main.tar.gz | |
Slices are asked for in the address, not a Range header the WebView drops;
a settings change runs at once; the notification is updated once a second;
the SMS section says how to lift Android's restricted setting; the photo
section says whether videos are included.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'packages/meshbay-android/app/src/main/kotlin/org/meshbay/client/phonesync/DocChannels.kt')
| -rw-r--r-- | packages/meshbay-android/app/src/main/kotlin/org/meshbay/client/phonesync/DocChannels.kt | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/packages/meshbay-android/app/src/main/kotlin/org/meshbay/client/phonesync/DocChannels.kt b/packages/meshbay-android/app/src/main/kotlin/org/meshbay/client/phonesync/DocChannels.kt index 2efe558..f4da64f 100644 --- a/packages/meshbay-android/app/src/main/kotlin/org/meshbay/client/phonesync/DocChannels.kt +++ b/packages/meshbay-android/app/src/main/kotlin/org/meshbay/client/phonesync/DocChannels.kt @@ -64,6 +64,7 @@ class DocChannels( "sent" -> { sent(args.optString(0, ""), args.optString(1, ""), args.optString(2, "")); true } "completed" -> { completed(); status() } "failed" -> failed(args.optString(0, ""), args.optString(1, "")) + "open-settings" -> { openSettings(); true } else -> throw Refused("Refused: no such channel") } @@ -167,6 +168,19 @@ class DocChannels( permission = null } + /** + * The application's page in the system's settings. Android keeps some + * permissions (text messages) behind "restricted settings" for an + * application installed outside a store; that page is where the person + * lifts it (⋮ > Allow restricted settings), and nowhere in here can. + */ + private fun openSettings() { + val intent = android.content.Intent(android.provider.Settings.ACTION_APPLICATION_DETAILS_SETTINGS, + android.net.Uri.fromParts("package", activity.packageName, null)) + .addFlags(android.content.Intent.FLAG_ACTIVITY_NEW_TASK) + activity.runOnUiThread { activity.startActivity(intent) } + } + /** From Activity.onRequestPermissionsResult; true when the request was ours. */ fun deliverPermission(requestCode: Int): Boolean { if (requestCode != permissionRequest) return false |