Commit Graph

2168 Commits

Author SHA1 Message Date
adbenitez aa1a602d36 add DcHelp.getRpc() 2023-04-23 15:59:04 -04:00
adbenitez d977d1f3a5 use get() 2023-04-23 15:27:39 -04:00
adbenitez 1d6d148c7e fix bug 2023-04-23 15:00:08 -04:00
adbenitez 5a5d27a3e7 add DcRpc class 2023-04-23 14:46:37 -04:00
link2xt 7d6ff619cf Start JSON-RPC parsing 2023-04-23 13:14:27 +00:00
link2xt 53dc77ec2d Disable requests for now 2023-04-22 23:06:40 +00:00
link2xt df1acac1a6 Trying to use StringWriter 2023-04-22 22:14:21 +00:00
link2xt e27a901f42 Generate request IDs 2023-04-22 21:29:16 +00:00
link2xt a7e6f4865f Try to send JSON-RPC requests 2023-04-22 20:59:31 +00:00
link2xt 39e9ab817e Add JSON-RPC thread
Printing JSON-RPC responses for now.
2023-04-22 20:09:11 +00:00
link2xt 5246ee77ad Remove getNextEventCPtr 2023-04-22 18:31:57 +00:00
link2xt 00fd1a95bb Add dcJsonrpcInstance to ApplicationContext 2023-04-22 17:58:03 +00:00
link2xt 39800733c6 Revert "Start using DcJsonrpcInstance"
This reverts commit 91ba9ae50c2db5279fddec76df9f6d3870ab737e.
2023-04-22 17:58:03 +00:00
link2xt 1405ae0b65 Start using DcJsonrpcInstance 2023-04-22 17:58:03 +00:00
link2xt 4f468a4b8f Add DcJsonrpcInstance class 2023-04-22 17:58:03 +00:00
bjoern 8d5372962f do not intercept requests when loading remote content is disabled (#2547)
even with setBlockNetworkLoads(true),
shouldInterceptRequest() is called,
not sure if this is a bug or expected behavior,
i did not find documentation for that;
intuitively, i dit not expect sort of a proxy to bypass
and explicit block_networks = true,
however, one can probably also argue in the other direction.

leaving setBlockNetworkLoads(true),
in case default behavior changes (or older webviews have different ones),
we have a second layer.
2023-04-20 22:09:15 +02:00
link2xt 0e657eed56 Set WebView proxy to 0.0.0.0 when possible (#2539)
* Set WebView proxy to 0.0.0.0 when possible

* add DcHttpResponse to wrapper

* use new DcHttpResponse to show images in email-html-view

* null-encoding is fine for WebResourceResponse()

---------

Co-authored-by: B. Petersen <r10s@b44t.com>
2023-04-20 21:30:19 +02:00
Hocuri ba8852930d Show verified icon exactly when the 1:1 chat is verified (#2541) 2023-04-13 17:36:04 +02:00
link2xt 66a2878a60 Set "X-DNS-Prefetch-Control: off" header 2023-04-09 17:21:27 +00:00
bjoern 0164cec434 join prepare/wait threads before calling unref (#2534)
* join prepare/wait threads before calling unref

* explain order of joining threads
2023-04-05 11:59:00 +02:00
bjoern 31939dc977 make transfer-backup devicemsg translatable (#2533) 2023-04-04 19:44:54 +02:00
bjoern 08265bf0f9 make sure, only one error alert is shown (#2526)
* make sure, only one error alert is shown

DcBackupProvider.unref() will soon also emit errors,
see https://github.com/deltachat/deltachat-core-rust/pull/4242 ,
but also before, this was only correct by coincidence

* do not handle events on shutdown

DcBackupProvider.unref() may emit events,
but that may happen also for other reasons.

be explicit by a flag,
relying on activity.isFinishing() or by the already removed observer seems
error prone, esp. on future changes. do not make me think :)
2023-04-04 10:28:32 +02:00
bjoern 7fa576e3b7 if known, show ssid in the AlertDialog directly after scanning (#2528) 2023-04-01 11:51:06 +02:00
bjoern affd120ba4 prepare 1.36 (#2522)
* update changelog for 1.36, core part

* update changelog for 1.36, android part

* bump version to 1.36

* add device message for 1.36

* qualify 'Add Second Device' as experimental also in device message

* apply recent suggestions to CHANGELOG
2023-03-29 12:32:42 +02:00
Asiel Díaz Benítez cb9147490a Merge pull request #2521 from deltachat/adb/issue-2520
remove notifications from closed accounts
2023-03-27 15:41:52 -04:00
adbenitez e8d398c693 remove notifications from closed accounts 2023-03-27 14:49:36 -04:00
link2xt e55eb9ba8e Avoid NullPointerException in setGenericInfoRecord 2023-03-27 10:51:04 +00:00
B. Petersen d69d7c06be show a little message before QR code generation
we already had a confirmation dialog for probably most security-aware users
always when the device is protected by a screen lock.

this commits adds a more on-point text -
and shows the same text in a simple alert in case a device has no screen lock.
2023-03-27 10:29:26 +02:00
B. Petersen 7b78358afb fix crashes when aborting during "prepare"
there might still be issues in core,
see https://github.com/deltachat/deltachat-core-rust/issues/4192
2023-03-27 10:29:26 +02:00
B. Petersen ffc7bce1c9 fix: update permantent notification also if only text but not percentage changes 2023-03-27 10:29:26 +02:00
B. Petersen b3d21f0be9 move "experimental" hint below qr-code/scanner
the hint in the title was regarded as "not so nice" on first tests
and was even overseen.
2023-03-27 10:29:26 +02:00
B. Petersen df3b488352 show exact progess on receiver side
while both devices show a progess bar,
the exact percentage is shown on receiver side only.

beside the receiver progress being more accurate,
main reason is not not confuse users by the devices showing
slightly different percentages.
2023-03-27 10:29:26 +02:00
B. Petersen 3bcf54def6 do not flash up "Waiting for receiver..." shortly
the screen is changed after a fraction of a second anways;
the message still goes to the permanent notification.
2023-03-27 10:29:26 +02:00
B. Petersen 4e4b453601 just say "Preparing acocunt..."
more detailed text about internals,
that maybe even flashes up only for a fraction of a second
is not helpful after first user tests,
and may even scare ppl.
2023-03-27 10:29:26 +02:00
B. Petersen 1421cb41df use conversation-list-adapter more carefully
we're also checking for null at some other critical code positions,
so this seems reasonable also here.
this might fix a recently reported crash,
maybe caused by a race condition.
2023-03-26 15:37:37 +02:00
B. Petersen 5dc85834a3 if possible, show used wifi already before scanning 2023-03-26 15:36:59 +02:00
Hocuri 3ff42b7c9e Fix sharing, again (#2506)
* Revert "use different values for  "ACCOUNT_ID_EXTRA and CHAT_ID_EXTRA""

This reverts commit 8962476a21.

* Use correct "chat_id" constant
2023-03-26 12:46:29 +02:00
B. Petersen 04ed2f9b38 add explicit experimental and version hint 2023-03-25 16:44:06 +01:00
B. Petersen a2765597dd add instructions 2023-03-25 16:44:06 +01:00
B. Petersen aa997eafb3 use title bar for qr-scan-activity, providing 'back', a title, and options in the future. the 'white only' should really be used only for the welcome screen 2023-03-25 16:44:06 +01:00
B. Petersen b36cfcabe9 add "Add as Second Device" to welcome view
ppl try already now to set up a second device from the welcome screen.
however, end up in logging into their email account again,
creating issues with keys and more.
a dedicated "Add as Second Devies" button targets this UX issue
by offering a clear path for setting up a second device.

moreover, the string "Scan Invitation Code" is used again (as on all releases),
this string is used quite a bit in different handouts,
changing that would worsen UX as well.

the "Restore from Backup is moved down,
if you really use this path, finding the button is the smallest issue.
the different layout of the button makes clear,
that this is not the preferred way to set up a new account
(but sure, to restore a backup :)
2023-03-25 16:44:06 +01:00
B. Petersen f931c9bc41 typo: receiver 2023-03-25 12:30:22 +01:00
B. Petersen 2e0ec41a37 fix leaving Delta Chat during backup transfer
this fixes leaving Delta Chat during backup transfer
by removing other activities that would abort BackupTransfer
by getting called with onNewIntent() otherwise.

moreover, the permantent notification is removed more reliably
and possible crashes in  the permantent notification closing (races ...)
are catched.

see code + comments for details.
2023-03-25 10:24:20 +01:00
bjoern a6ea240c26 cleanup base activities (#2508)
* remove superfluous overwrites

* move initFragment() to BaseActivity so that it can be better accessed
2023-03-25 00:12:17 +01:00
bjoern 3cede346f3 add multi-device-setup (#2493)
* add DcBackupProvider add receiveBackup() wrappers

* add 'Add Another Device' item to settings

* add android-ifaddrs

core-rust uses getifaddrs() which is not available on android ndk.
pull in the code from https://github.com/morristech/android-ifaddrs
that provides an implementation.

* add BackupProviderActivity

* make SVG-hack reusable

* add BackupProviderFragment

* prepare scanning backup codes

* Revert "add android-ifaddrs"

This reverts commit 33b1424427620396f282805d37f8e05c67758546.

* more logging

* call receiveBackup() on scanning DC_QR_BACKUP

* Fixup for recvmmsg fallback

* protect BackupProviderActivity by system secret

* show transfer progress as provided form the core; hide qr-code once scanned

* add a permanent notification for the provider

* clarify what we are waiting for

* add a permanent notification for the receiver

* ask before finishing BackupProviderActivity

* it is fine to cancel the abort question by tapping outside the alert

* remove outdated comment from 'keep screen on'

* add and check TRANSFER_MODE

* rename BackupProviderActivity to BackupTransferActivity

* use our base activity

* start/stop IO in base activity

* use BackupTransferActivity also for scanning

* add BackupReceiverFragment

* show detailed transfer progress

* show details instead of percent during preparation, for now

* launch chatlist and remove welcome when transfer is done

* redirect to chatlist automatically after transfer succeeded

* reword

* make log accessible from send and receive activities

* bump version

* show error if backup provider creation fails

* remove unneeded format()

* show some context in the errors alerts, hide QR code sooner

* calculate transfer percentage as specified

* show a 'close' instead of a 'back' button to make visually clear, things are aborted (there is a quesion anyway)

* add option to copy backup-qr-code to clipboard

* remove vague retry statement, core will show a detailed error soon

* warn about QR codes on clipboard getting invalidated

* make basic strings translatable

* add troubleshooting menu item (once help is evolved, it may be a more visible button, may be localized, may be offline)

* rename to backup_transfer_fragment.xml

* add detailed instructions

* move 1,2,3 layout to the .xml

* fix layout

* use text size used elsewhere

* do best effort to show SSID on sending device

* make SSID code reusable for receiver

* adapt to otherwise used font style

* show ssid also for receiver

* minor refactorings

* make qr code subtitle translatable

* tune down 'same network hint' on scanning device

* add progress bar to provider

* add progress bar to receiver

* bump version

* use 'Add Second Device' wording

this seems slightly catchier as "Add Another Device"
and has less "A" esp. in "Add as Another Device" :)

also at least translation to german seems nicer ("Zweitgerät"),
most ppl will use max. two devices, but even if more,
that should still be fine.

this was also the first intuition also by other devs in their mockups,
so we'll give it a try.

* use "Exporting/Preparing/Prepared Account" wording

let's give that a try - "Account" is also widely used,
so that seems to make some sense.
even if not 100% fitting,
it seems better than introducing the new term "Collection".

* refine abort question

* Update res/layout/backup_provider_fragment.xml

Co-authored-by: Hocuri <hocuri@gmx.de>

* Update src/org/thoughtcrime/securesms/qr/BackupProviderFragment.java

Co-authored-by: Hocuri <hocuri@gmx.de>

* Update src/org/thoughtcrime/securesms/qr/BackupReceiverFragment.java

Co-authored-by: Hocuri <hocuri@gmx.de>

* Update src/org/thoughtcrime/securesms/qr/BackupTransferActivity.java

Co-authored-by: Hocuri <hocuri@gmx.de>

* Update src/org/thoughtcrime/securesms/qr/BackupReceiverFragment.java

Co-authored-by: Hocuri <hocuri@gmx.de>

* remove string duplicate

* refine 1,2,3

* simplify string ids

* focus on what matters

---------

Co-authored-by: link2xt <link2xt@testrun.org>
Co-authored-by: Hocuri <hocuri@gmx.de>
2023-03-24 15:22:26 +01:00
Asiel Díaz Benítez 1523e7bc07 add app icon to webxdc info messages (#2503)
* add app icon to webxdc info messages

* Update res/layout/conversation_item_update.xml

Co-authored-by: Hocuri <hocuri@gmx.de>

* check if info message type is DcMsg.DC_INFO_WEBXDC_INFO_MESSAGE before loading parent message

---------

Co-authored-by: Hocuri <hocuri@gmx.de>
2023-03-22 15:44:56 +01:00
Asiel Díaz Benítez 33db24b41f Merge pull request #2496 from deltachat/adb/improve-qr-show
set background image for QrShowFragment
2023-03-14 13:44:06 -04:00
adbenitez b116da053c set background image for QrShowFragment 2023-03-14 11:29:57 -04:00
bjoern 69600179d2 fix "empty hints" for "all media" view (#2499)
a common hint makes things easier,
and also has the advantage, that it is more clear to the user what the
focus of this view is as it picks up the wording from the title.
2023-03-14 15:41:54 +01:00
Asiel Díaz Benítez b4682b9d79 Merge pull request #2497 from deltachat/adb/tweak-menus
tweak main menu and settings
2023-03-13 20:27:03 -04:00