sdk16/android4.1 does not support RTL fully,
therefore just return LTR in this case
(this is also what `ViewCompat.getLayoutDirection()`
and `View.getLayoutDirection()` are doing).
always using `ViewCompat.getLayoutDirection()`, however,
causes problems as the layout is based on the content then
(see #2422)
closes#2420
notificationManager.notify() sometime crashes,
it seems to be on some OS versions
in combination with missing sounds (maybe deleted system sounds, idk).
i could not reproduce the issue,
however, by the stack traces reported in the gplay backend,
adding a try/catch block should help.
there is also a similar issue reported on stackoverflow ,
https://stackoverflow.com/questions/72491592/notificationmanager-notify-throwing-securityexception-only-on-android-11-and-1
in the issue, ppl try to fall back to some default parameters in the exception block,
however, as it is a bit unclear what really the issue is,
one only risks further crashes; also, the crashes are still quite rare,
sth. seems to be wrong in the OS here,
so we should not try to be too smart here.
* bump targetSdkVersion to 32
* explicitly set `android:exported` for `indent-filter`
this is required since targetSdkVersion 31,
https://developer.android.com/guide/components/intents-filters#Receiving
as the default was `false` before,
i just explicitly set `android:exported="false"` without looking in the details
of each filter.
* update to gradle 7.2.2; this might be needed to get warnings etc.
* update androidx dependencies
at least the update of androidx.sharetarget is required because of the missing
`android:exported`; i took the chance to update all androidx depenencies.
see https://developer.android.com/jetpack/androidx/releases/appcompat
for a CHANGELOG of each dependency.
* use explicit dependency instead of transitive ones; this fixes a weird duplicate error, see https://stackoverflow.com/questions/69817925/problem-duplicate-class-androidx-lifecycle-viewmodel-found-in-modules
* work around google's poor design decision wrt FLAG_MUTABLE
instead of setting a default behavior and logging a warning,
google crashes the application when the flag is missing on newer androids.
and setting the flag for older API seems to be undefined and therefore a lot of
Build.VERSION.SDK_INT >= Build.VERSION_CODES.M would be required each time
a PendingIntent object is constructed ...
our Util returns either the new flag or zero,
so that can just be used unconditionally on construction.
* update dependencies but exoplayer to mitigate issues with FLAG_MUTABLE
exoplayer needs more love and updating opens a can of worms;
i tested, at least in the emulator, video and voice message playback
works as usual, so let's update exoplayer if needed.
* add dclogin scheme to qr code scan
* Update src/org/thoughtcrime/securesms/qr/QrCodeHandler.java
Co-authored-by: Asiel Díaz Benítez <asieldbenitez@gmail.com>
* Update src/org/thoughtcrime/securesms/qr/QrCodeHandler.java
Co-authored-by: bjoern <r10s@b44t.com>
* handle DCACCOUNT and DCLOGIN schemes on new intents
* keep existing function name, that is maybe not less confusing, but at least already known
Co-authored-by: bjoern <r10s@b44t.com>
Co-authored-by: Asiel Díaz Benítez <asieldbenitez@gmail.com>
* move webxdc private apps to separate tab
* switch to scrollable tab layout; fixed layout may look not-so-nice with more tabs and longer descriptions that get a tiny font then
* reword "Webxdc [content]" to "Webxdc Apps"
adding "App" to the term makes things much clearer to the user,
was "Webxdc" is about.
eg. on iOS, we have an app selector meanwhile,
calling that _just_ "Webxdc" in the menu or in the title makes it pretty
unclear to the user what this is about.
same for the tab "Webxdc" on desktop or the default description in the summary.
otoh, calling it _only_ "Apps" (as now), may also raise false expectations
and may be mixed with "normal" apps.
so, "Webxdc App" seems to be a good approach.
there is also the term "Mini App" [^1], we could also go for that,
but this is a broader discussion as this would give up the term "Webxdc" partly.
in any case, if there is few space in the UI,
it seems to be okay to abbreviate with just "App" or "Apps" as needed,
if it is otherwise clear that the thing is a "Webxdc App" or "Mini App".
[^1]: the term "Mini App" is aleady known for similar types of apps
(some "small app" running in a "super app")
cmp. https://www.w3.org/TR/mini-app-white-paper/#what-is-miniapp .
of course, our "Webxdc Apps" are not compatible with other "Mini Apps"
however, this is also not the case between "Mini Apps" of other vendors
which also have different focuses.
so "Mini App" seems to be a broader term and does not imply compatibiliy.
* use term 'Private Apps' for webxdc content
* add some translator hints
* load contact from database before calling wasSeenRecently() in ConversationActivity.handleEvent()
* add a comment about why handling DC_EVENT_MSG_DELIVERED is needed
* do not set deprecated stock-translations
* mark now unused stock translations as deprecated
* add new system messages to english strings.xml
* add translator comments to new strings
* set new system messages
* Revert "create adaptive shortcuts"
This reverts commit 35dd8c905b.
The cut out is not the largets possible circle inside the square icon
(as for group images or avatars, diameter==height)
but a much smaller circle (diameter==~0.6*height),
resulting in too many information being left out.
Therefore, it is better to leave icon layout to the OS.
(to get an idea about the amount of cut out, see a circular logo,
eg. the hextris one)
* add comment why not to use createWithAdaptiveBitmap()
* simplify contact list
this also disables "fast scrolling" for the contact list;
the "fast scrolling" code is too much bound to the bubbles and a-z
to be preserved without much effort.
however, "fast scrolling" seems to be much less important
with a list sorted by "last seen".
there is also the rough idea to raise minimal-origin of contact list,
this would make the list much smaller
(<https://github.com/deltachat/deltachat-core-rust/pull/2411>),
otoh, not sure if #2411 is a thing for list sorted by "last seen".
also the other lists (chatlist, archive, blocked) may become quite huge as well
and do never have "fast scrolling".
in case it is really needed again,
however, we should go for the implementation available in RecyclerView since some time:
<https://stackoverflow.com/questions/45370246/how-to-use-fastscrollenabled-in-recyclerview>
* less padding as the A-Z decorations do not longer need space
* remove unused contact_selection_recyclerview_header
* add 'Add to Home Screen' menus for webxdc apps
* make adding shortcut basically work
* avoid starting webxdc from foreign accounts
* recreate back stack, if possible
according to
https://developer.android.com/training/notify-user/navigation :
"When you start an activity from a notification,
you must preserve the user's expected navigation experience.
Tapping Back should take the user
back through the app's normal work flow to the Home screen [...]"
same seems to be true for shortcuts using the same class for constructing
the back stack.
the back stack is reconstructed for API 26 (Oreo, 2017) or newer,
for oder API `requestPinShortcut()`
only uses the top-level activity for the shortcut.
working around that is probably possible, but would be quite some effort in an
already complicated area and would result in bugs that are not so easy to see.
also, on these old androids, users are probably used to the no-back-stack
behaviour.
* show a warning if app was deleted
* add 'Add to Home Screen' also to gallery
beside chat- and webxdc-activity,
this is the third place where the webxdc is listed.
as adding may result in dialogs from the launcher,
we allow the option only for a single selected webxdc,
as otherwise a series of dialogs would pop up.
* show 'Done' toast short, this is what we are doing at all the other places when showing 'Done'
- "Files" is broader than "Docs"
(documents are just one type of files,
files can also be executables and whatnot)
- at other places in the app, we also speak of "Files"
("sending files" etc.)
- Delta Chat iOS also uses the term "Files"
* bump version to 1.31.0
* update changelog for 1.31.0 (add core88 features)
* update changelog for 1.31.0 (android features)
* remove outdated device message, the final 1.32 will probably get a fresh one
`videochat_instance_explain_2`+`videochat_instance_example`
is mostly the same as `videochat_instance_explain`
but offers nicer layout on desktop.
to make things easier for translators,
we aim to remove `videochat_instance_explain`.
for webxdc, the system-back-button should do the same
as the back-button in the title bar - just close the webxdc.
without this commit, it loads the previous page, which is often unexpected -
eg. many games use reload() for simplicity,
so you would have press one time 'back' for each round :)
even if there may be situations where this may be useful,
we do not want to encourage webxdc to rely on the system-back-button -
eg. desktop or ios currently just do not have this button.
technically, this pr changes the default -
so, for all classes derived from WebViewActivity, the system-back-button will
now behave as the title-bar-back-button.
for the local-help, this behavior is changed explictly -
i think, for HTML-mails, the 'just close' approach is also better.