Commit graph

4174 commits

Author SHA1 Message Date
Marcel Hibbe
40f20c56d6 update poll UI for moderators etc
- allow to end poll for moderators

- allow to see voters amount for voting screen for moderators and creators of the poll

- replace UserEntity with User

- show numVoters instead of votes

- minor refactoring

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2022-07-22 17:54:57 +00:00
Marcel Hibbe
c848659fda fix text of submit button
+ rename variables

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2022-07-22 17:54:57 +00:00
Marcel Hibbe
385d5ccd4a fix copyrights
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2022-07-22 17:54:57 +00:00
Marcel Hibbe
6ab5dace1c fix layouts to handle poll with many options
make options scrollable

replace constraint layout with linear layouts + layout_weight="1"

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2022-07-22 17:54:57 +00:00
Marcel Hibbe
cedbcaefee fix percentage calculation for multiselect polls
for multiselect polls the total votes must be taken instead amount of voters (one voter can have more than 1 votes..)

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2022-07-22 17:54:57 +00:00
Marcel Hibbe
9e8dbb70f3 remove livedata where it's not needed
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2022-07-22 17:54:57 +00:00
Marcel Hibbe
2988b667fe solve detekt warnings 2
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2022-07-22 17:54:57 +00:00
Marcel Hibbe
2b8ee4953b solve detekt warnings
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2022-07-22 17:54:57 +00:00
Marcel Hibbe
1b13812202 solve klint warnings
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2022-07-22 17:54:57 +00:00
Marcel Hibbe
4c6e4b1c4c add copyright headers
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2022-07-22 17:54:57 +00:00
Marcel Hibbe
23bf072326 fix InstantiationException for more fragments
followup to a12692ec + get parentViewModel by ViewModelProvider

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2022-07-22 17:54:57 +00:00
Marcel Hibbe
38256fc25d fix compile error from commit a12692ec
(temporarily...)

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2022-07-22 17:54:57 +00:00
Marcel Hibbe
1a000859bf fix InstantiationException for fragments
fragments must have a public, no-arg constructor.
extra information must be passed as arguments.

With a constructor that receives the data, the following error occurs:

Fragment$InstantiationException: Unable to instantiate fragment ..... could not find Fragment constructor

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2022-07-22 17:54:57 +00:00
Marcel Hibbe
3224ae1e1f improve klint score, minor refactoring
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2022-07-22 17:54:57 +00:00
Marcel Hibbe
b347fbf1b5 rename close poll to end poll (in code)
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2022-07-22 17:54:57 +00:00
Marcel Hibbe
bd99245c26 add confirm dialog to end poll
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2022-07-22 17:54:56 +00:00
Marcel Hibbe
01f7016ae2 convert "votes" map
see https://github.com/nextcloud/spreed/pull/7500

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2022-07-22 17:54:56 +00:00
Marcel Hibbe
73d48a395c show detailed list of voters
+ refactoring adapter and viewholders for result screen

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2022-07-22 17:54:56 +00:00
Marcel Hibbe
909ee07ce6 wip2: styling of poll bars
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2022-07-22 17:54:56 +00:00
Marcel Hibbe
bddd6b2e8e wip: styling of poll bars
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2022-07-22 17:54:56 +00:00
Marcel Hibbe
318549a63a wip: show user avatars for closed public polls
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2022-07-22 17:54:56 +00:00
Marcel Hibbe
fb54b35cf0 rename close poll to end poll
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2022-07-22 17:54:56 +00:00
Marcel Hibbe
6447b82969 disable vote button when selection is not changed compared to own votes
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2022-07-22 17:54:56 +00:00
Marcel Hibbe
167aa43ca0 make own votes bold in result screen
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2022-07-22 17:54:56 +00:00
Marcel Hibbe
a95c0d997b make own votes bold in voting screen
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2022-07-22 17:54:56 +00:00
Marcel Hibbe
782d74bfb9 restrict multiselection to maxVotes
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2022-07-22 17:54:56 +00:00
Marcel Hibbe
a4c48b11d6 fix radiobuttons
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2022-07-22 17:54:56 +00:00
Marcel Hibbe
2da4c37a52 remove liveData for selectedOptions
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2022-07-22 17:54:56 +00:00
Marcel Hibbe
acda3d283b add multiselect for poll options
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2022-07-22 17:54:56 +00:00
Marcel Hibbe
8541ebbfc0 add ability to close poll in PollVoteFragment
this adds duplicate button logic atm. might need to be improved..

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2022-07-22 17:54:56 +00:00
Marcel Hibbe
8c898404d1 move details text to PollMainViewModel
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2022-07-22 17:54:56 +00:00
Marcel Hibbe
fbd5e5f5ed show voting screen for open private polls
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2022-07-22 17:54:56 +00:00
Marcel Hibbe
b504af1cd9 add UI logic + close poll system message
add close poll button (wip/temporarily?)
add "close poll" system message
add UI related logic to PollMainViewModel
add placeholder for pollDetails in UI

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2022-07-22 17:54:56 +00:00
Marcel Hibbe
ea0b7d07cc poll creation: add logic to enable/disable buttons
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2022-07-22 17:54:56 +00:00
Marcel Hibbe
8148bfaa65 add poll system message, klint fixes
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2022-07-22 17:54:56 +00:00
Marcel Hibbe
9f90e9c4c6 wip: create poll using multiple livedata fields
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2022-07-22 17:54:56 +00:00
Marcel Hibbe
b140cc8751 wip: create poll using livedata
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2022-07-22 17:54:56 +00:00
Marcel Hibbe
af427f8300 wip: create poll. show outgoing polls
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2022-07-22 17:54:56 +00:00
Marcel Hibbe
0388f3e3f6 fix to show vote results if only "poll.votes" are available
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2022-07-22 17:54:56 +00:00
Marcel Hibbe
d31a9b1ade fix to send votes
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2022-07-22 17:54:56 +00:00
Marcel Hibbe
5a070f5e1b wip: view poll results
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2022-07-22 17:54:56 +00:00
Marcel Hibbe
7d8aebe234 wip: vote on poll
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2022-07-22 17:54:56 +00:00
Marcel Hibbe
81666829b5 fetch poll to set subtitle in message
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2022-07-22 17:54:56 +00:00
Marcel Hibbe
ae80a4e2ad pass roomToken to MessageViewHolders
wrap roomToken and ProfileBottomSheet in data class MessagePayload

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2022-07-22 17:54:56 +00:00
Marcel Hibbe
c7e9721809 wip: get poll from API
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2022-07-22 17:54:56 +00:00
Álvaro Brey
42324419cd wip: Poll view model work
Signed-off-by: Álvaro Brey <alvaro.brey@nextcloud.com>
2022-07-22 17:54:56 +00:00
Marcel Hibbe
01f18d7eca add API poll details
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2022-07-22 17:54:56 +00:00
Marcel Hibbe
e605546925 fix klint warnings
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2022-07-22 17:54:56 +00:00
Marcel Hibbe
bf05445561 open poll dialog
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2022-07-22 17:54:56 +00:00
Marcel Hibbe
f2025332ab add data classes for polls (WIP)
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2022-07-22 17:54:56 +00:00
dependabot[bot]
b70fd95516
Bump exoplayer from 2.18.0 to 2.18.1
Bumps [exoplayer](https://github.com/google/ExoPlayer) from 2.18.0 to 2.18.1.
- [Release notes](https://github.com/google/ExoPlayer/releases)
- [Changelog](https://github.com/google/ExoPlayer/blob/release-v2/RELEASENOTES.md)
- [Commits](https://github.com/google/ExoPlayer/compare/r2.18.0...r2.18.1)

---
updated-dependencies:
- dependency-name: com.google.android.exoplayer:exoplayer
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-22 19:51:22 +02:00
Andy Scherzinger
00f55f1949
use correct primary key to search for any other users in the DB and use current value from user attributes object
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2022-07-22 19:50:29 +02:00
Andy Scherzinger
6a8cafec22
migrate location picker from requery to room
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2022-07-22 13:52:34 +02:00
Andy Scherzinger
dac99a5db8
Remove unused (legacy) UserUtils
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2022-07-22 13:52:34 +02:00
Andy Scherzinger
e7756003d7
remove variable shadowing
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2022-07-22 13:52:33 +02:00
Álvaro Brey
a3b99e9010
UserManager: fix rx logic for scheduleUserForDeletionWithId
Signed-off-by: Álvaro Brey <alvaro.brey@nextcloud.com>
2022-07-22 13:52:33 +02:00
Andy Scherzinger
e7c258e2f8
fix detekt issues
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2022-07-22 13:52:33 +02:00
Andy Scherzinger
9bdd0c7a4e
Fix user manager db result processing
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2022-07-22 13:52:32 +02:00
Andy Scherzinger
6e05056b2e
Migrate AccountVerificationController from requery to room
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2022-07-22 13:52:32 +02:00
Andy Scherzinger
8d87d5486b
update to latest API changes for storing users
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2022-07-22 13:52:32 +02:00
Andy Scherzinger
036e67027c
Migrate web view login from requery to room
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2022-07-22 13:52:31 +02:00
Andy Scherzinger
fe8c7d468a
Migrate server selection from requery to room
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2022-07-22 13:52:31 +02:00
dependabot[bot]
464e603807
Bump daggerVersion from 2.42 to 2.43
Bumps `daggerVersion` from 2.42 to 2.43.

Updates `dagger` from 2.42 to 2.43
- [Release notes](https://github.com/google/dagger/releases)
- [Changelog](https://github.com/google/dagger/blob/master/CHANGELOG.md)
- [Commits](https://github.com/google/dagger/compare/dagger-2.42...dagger-2.43)

Updates `dagger-compiler` from 2.42 to 2.43
- [Release notes](https://github.com/google/dagger/releases)
- [Changelog](https://github.com/google/dagger/blob/master/CHANGELOG.md)
- [Commits](https://github.com/google/dagger/compare/dagger-2.42...dagger-2.43)

---
updated-dependencies:
- dependency-name: com.google.dagger:dagger
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: com.google.dagger:dagger-compiler
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-22 13:44:54 +02:00
Álvaro Brey
da6ca10cb8
PushRegistrationWorker: fix missing injection causing NPE during login
Signed-off-by: Álvaro Brey <alvaro.brey@nextcloud.com>
2022-07-22 10:16:37 +02:00
Andy Scherzinger
5eab5f86f7 push token recover is should not use the standard httpClient object and its cookieStore
Resolves #2218

Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2022-07-22 06:48:40 +00:00
Nextcloud bot
d81e82c833
[tx-robot] updated from transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2022-07-20 04:12:38 +00:00
dependabot[bot]
f6420e343f
Bump firebase-messaging from 23.0.5 to 23.0.6
Bumps firebase-messaging from 23.0.5 to 23.0.6.

---
updated-dependencies:
- dependency-name: com.google.firebase:firebase-messaging
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-19 13:30:35 +02:00
Tim Krüger
8f0fbc7d60
Merge pull request #2174 from nextcloud/dependabot/gradle/com.google.android.gms-play-services-base-18.1.0
Bump play-services-base from 18.0.1 to 18.1.0
2022-07-19 11:29:45 +02:00
Nextcloud bot
1ae4379e04
[tx-robot] updated from transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2022-07-19 04:14:14 +00:00
Andy Scherzinger
7ce5746969
rename updateUser to updateOrCreateUser
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2022-07-18 18:52:51 +02:00
Andy Scherzinger
96910c02a1
simplify call logic
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2022-07-18 18:52:51 +02:00
Andy Scherzinger
480122d648
rename entity to user
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2022-07-18 18:52:51 +02:00
Andy Scherzinger
7568ccdbb1
split account matcher code for better readability
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2022-07-18 18:52:50 +02:00
Andy Scherzinger
8efbd14fe0
Migrate switching accounts from requery to room
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2022-07-18 18:52:50 +02:00
Andy Scherzinger
ac7652b5de
Migrate Settings and Profile controller from requery to room
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2022-07-18 18:52:49 +02:00
Andy Scherzinger
74fbd3feeb
Merge pull request #2224 from nextcloud/dependabot/gradle/io.gitlab.arturbosch.detekt-detekt-gradle-plugin-1.21.0
Bump detekt-gradle-plugin from 1.20.0 to 1.21.0
2022-07-18 18:52:24 +02:00
dependabot[bot]
0ad49989a3
Bump detekt-formatting from 1.20.0 to 1.21.0
Bumps [detekt-formatting](https://github.com/detekt/detekt) from 1.20.0 to 1.21.0.
- [Release notes](https://github.com/detekt/detekt/releases)
- [Commits](https://github.com/detekt/detekt/compare/v1.20.0...v1.21.0)

---
updated-dependencies:
- dependency-name: io.gitlab.arturbosch.detekt:detekt-formatting
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-18 14:20:44 +02:00
Nextcloud bot
17a48826d3
[tx-robot] updated from transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2022-07-18 04:12:11 +00:00
Nextcloud Android Bot
689f5c8ecf Weekly 14.2.0 Alpha 03 2022-07-18 03:12:43 +00:00
Nextcloud bot
489928904d
[tx-robot] updated from transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2022-07-17 04:13:13 +00:00
Andy Scherzinger
80570e59b4
rename user var to better reflect its type
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2022-07-16 16:01:15 +02:00
Andy Scherzinger
f4cde24f8e
Migrate contacts and creation of talk rooms from requery to room
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2022-07-16 15:52:01 +02:00
Andy Scherzinger
1c672c04e3
Merge pull request #2219 from nextcloud/chore/1549/roomMigration2
Migrate calls and used classes/methods from requery to room
2022-07-16 15:15:33 +02:00
Andy Scherzinger
4bdc2c1081
Migrate recieving calls from requery to room
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2022-07-16 14:51:07 +02:00
Andy Scherzinger
cbe4658632
add method to update external signaling information
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2022-07-16 14:39:18 +02:00
Andy Scherzinger
75aa5c9379
reformat code
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2022-07-16 14:33:55 +02:00
Nextcloud bot
a743e32cbb
[tx-robot] updated from transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2022-07-16 04:13:29 +00:00
drone
5e2bd3c12d Merge commit 'fde2667fe79a09e6b267a26bb61c06730d43d7d5' 2022-07-14 16:40:05 +00:00
Andy Scherzinger
fde2667fe7
Migrate Call Activity and used classes/methods from requery to room
Resolves #2216

Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2022-07-14 18:19:43 +02:00
Marcel Hibbe
95f3d776db
fix switching conversation titles
This reverts a change from a24f49c7

Before a24f49c7 in onDestroy() the disposables were not disposed. Instead this was "only" done in onComplete() of leaveRoom().
See a24f49c#diff-6b47d0e9875a7f7d5c1e6b80feab998e92d29b0cda8ac9bbf427aab99e56d209R1827
Because with a24f49c7 was now executed in onDestroy() , the leaveRoom() method is not executed successfully because it's destroyed too early. This results in multiple calls of getRoomInfo() with different roomTokens.

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2022-07-14 10:21:13 +02:00
Nextcloud bot
e682d30369
[tx-robot] updated from transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2022-07-14 04:13:41 +00:00
Andy Scherzinger
f2fe776603
Deprecate legacy method
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2022-07-13 00:22:24 +02:00
Andy Scherzinger
835cac8189
organize imports
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2022-07-13 00:22:24 +02:00
Andy Scherzinger
fb33b1c52d
add flag for mockito tests with Rx
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2022-07-13 00:22:24 +02:00
Andy Scherzinger
7230f81cf5
Migrate conversations list and next hop controllers to use the room user entity
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2022-07-13 00:22:03 +02:00
Andy Scherzinger
110e8a76b7
make getImageRequestForUrl accept user or userEntity and have a variant without a user
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2022-07-13 00:22:02 +02:00
Andy Scherzinger
9b28a8cfe3
make hasChatPermission accept user and userEntity
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2022-07-13 00:22:02 +02:00
Andy Scherzinger
9fb176dc88
make helper methods easy to access from java code
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2022-07-13 00:21:59 +02:00
Andy Scherzinger
0fe26b6d08
Merge pull request #2199 from nextcloud/feature/noid/markAsRead
Mark as read via notification
2022-07-13 00:20:43 +02:00
Andy Scherzinger
ea849281e5
Merge pull request #2210 from nextcloud/chore/noid/with-nullable-binding
Add method in NewBaseController to handle NPE catches for viewbinding
2022-07-12 16:31:55 +02:00
Dariusz Olszewski
dafa1bfb2e Mark as read - reduce scope of try/catch
NumberFormatException is expected only inside parseMessageId. To avoid masking other errors accidentally, seems better to have try/catch only around parseMessageId call.

Signed-off-by: Dariusz Olszewski <starypatyk@users.noreply.github.com>
2022-07-12 12:51:03 +00:00
Dariusz Olszewski
97ea95c30f Mark as read - SpotBugs
Signed-off-by: Dariusz Olszewski <starypatyk@users.noreply.github.com>
2022-07-12 12:51:03 +00:00
Andy Scherzinger
f91d45e2db Improve message id parsing
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2022-07-12 12:51:03 +00:00
Dariusz Olszewski
9a247b48ac Mark as read - correct error message
Signed-off-by: Dariusz Olszewski <starypatyk@users.noreply.github.com>
2022-07-12 12:51:03 +00:00
Dariusz Olszewski
c3a31da6a9 Mark as read - extract buildIntentForAction function
Signed-off-by: Dariusz Olszewski <starypatyk@users.noreply.github.com>
2022-07-12 12:51:03 +00:00
Dariusz Olszewski
7243142676 Mark as read - use message ID retrieved from server
Minimal set of changes, to be cleaned-up.

Signed-off-by: Dariusz Olszewski <starypatyk@users.noreply.github.com>
2022-07-12 12:51:03 +00:00
Andy Scherzinger
f977b566a5 Implement mark as read via notification
Resolves #2164

Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2022-07-12 12:51:03 +00:00
Álvaro Brey
e7222529c1
Make private broadcast permission depend on applicationId
Otherwise we can't install QA and normal app side by side

Signed-off-by: Álvaro Brey <alvaro.brey@nextcloud.com>
2022-07-12 13:16:35 +02:00
Álvaro Brey
8e3dc066b2
Add method in NewBaseController to handle NPE catches for viewbinding
This is really a symptom of unreliable design around the async logic in Controllers. The data async calls should have been separate from the controller,
so that the only asynchronicity the Controller has to deal with is UI-related, and can be cancelled safely on destroyView.

In the future as those controllers are converted to something that has a separate ViewModel, this kind of catch should be completely unneeded.

Signed-off-by: Álvaro Brey <alvaro.brey@nextcloud.com>
2022-07-12 12:46:10 +02:00
Marcel Hibbe
1f5807b8de fix NPE for binding in onEmojiClickListener
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2022-07-11 17:24:56 +00:00
Marcel Hibbe
d983c62589 fix crash when changing status during call
"call" is not contained in predefinedStatusesList so it crashed when searching for it with predefinedStatusesList.first()

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2022-07-11 17:09:06 +00:00
Andy Scherzinger
82dbadc028
Merge pull request #2201 from nextcloud/bugfix/2198/fixNpeViewBindingTogglePublicConversation
catch NPE for binding in toggleCallHeader
2022-07-11 18:26:39 +02:00
Marcel Hibbe
0dbe8c0f2c
catch NPE for binding (loadCurrentStatus#onError)
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2022-07-11 13:44:24 +02:00
Marcel Hibbe
04c96dd400
catch NPE for binding
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2022-07-11 13:32:54 +02:00
Nextcloud Android Bot
2615da0121 Weekly 14.2.0 Alpha 02 2022-07-11 03:20:58 +00:00
Nextcloud bot
9bf2a7c3a1
[tx-robot] updated from transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2022-07-10 04:15:26 +00:00
Nextcloud bot
ed8ca611ca
[tx-robot] updated from transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2022-07-09 04:13:07 +00:00
Nextcloud bot
559537d6be
[tx-robot] updated from transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2022-07-08 04:14:42 +00:00
Álvaro Brey
a24f49c737
Introduce DisposableSet to handle multiple disposables at once
This should be used in places where multiple Disposables are handled simultaneously as a simple way of
ensuring that all disposables are cleared on exit. For example on ViewModels and Controllers should likely use one
of these and clear it on their respective lifecycle end.

I've included an example use in ChatController, where it replaces an existing `ArrayList<Disposable>`, but the benefit
should be more visible in places where Disposables are currently handled separately.

Signed-off-by: Álvaro Brey <alvaro.brey@nextcloud.com>
2022-07-07 16:47:17 +02:00
Andy Scherzinger
30cbe0f43c
set/read matching user context
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2022-07-07 14:29:33 +02:00
Andy Scherzinger
7b4b1b7e84
Revert "read matching user context"
This reverts commit 07c57bcfd1.

Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2022-07-07 14:03:25 +02:00
Andy Scherzinger
07c57bcfd1
read matching user context
Resolves #2180

Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2022-07-07 13:58:15 +02:00
Álvaro Brey
95119ba9d6
ProfileController: code cleanup
Signed-off-by: Álvaro Brey <alvaro.brey@nextcloud.com>
2022-07-07 13:51:56 +02:00
Álvaro Brey
cb2ee730fa
WIP: upload profile picture from camera
Signed-off-by: Álvaro Brey <alvaro.brey@nextcloud.com>
2022-07-07 13:51:55 +02:00
dependabot[bot]
352c27ff66
Bump play-services-base from 18.0.1 to 18.1.0
Bumps play-services-base from 18.0.1 to 18.1.0.

---
updated-dependencies:
- dependency-name: com.google.android.gms:play-services-base
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-07 01:06:47 +00:00
Andy Scherzinger
4ad8957e6c
Bump androidx.camera from 1.1.0-rc02 to 1.1.0
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2022-07-06 22:41:18 +02:00
Andy Scherzinger
6725545bad
unify lifecycle version and bump to 2.5.0
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2022-07-05 12:45:08 +02:00
dependabot[bot]
7e370ee61d
Bump lifecycle-runtime-ktx from 2.2.0 to 2.5.0
Bumps lifecycle-runtime-ktx from 2.2.0 to 2.5.0.

---
updated-dependencies:
- dependency-name: androidx.lifecycle:lifecycle-runtime-ktx
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-05 12:08:13 +02:00
dependabot[bot]
f3a8e896ab
Bump roomVersion from 2.2.5 to 2.4.2
Bumps `roomVersion` from 2.2.5 to 2.4.2.

Updates `room-runtime` from 2.2.5 to 2.4.2

Updates `room-rxjava2` from 2.2.5 to 2.4.2

Updates `room-compiler` from 2.2.5 to 2.4.2

Updates `room-ktx` from 2.2.5 to 2.4.2

---
updated-dependencies:
- dependency-name: androidx.room:room-runtime
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: androidx.room:room-rxjava2
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: androidx.room:room-compiler
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: androidx.room:room-ktx
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-04 20:48:49 +00:00
Andy Scherzinger
ba1c075df3
bump master to 14.2.0 Alpha 1
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2022-07-04 22:45:40 +02:00
Nextcloud bot
9a2ffbced2
[tx-robot] updated from transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2022-07-04 04:13:07 +00:00
Nextcloud Android Bot
b42c567249 Weekly 14.1.0 Alpha 12 2022-07-04 03:18:07 +00:00
Nextcloud bot
ab5c8c24c9
[tx-robot] updated from transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2022-07-03 04:08:26 +00:00
Andy Scherzinger
c151da3080
safeguard mapper for null values on fields that need to be json-parsed
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2022-07-01 08:59:23 +02:00
Álvaro Brey
886a3d0df2
UsersDao: make setUserAsActiveWithId blocking
Room won't accept non-blocking @Transactions, which makes sense

Signed-off-by: Álvaro Brey <alvaro.brey@nextcloud.com>
2022-07-01 08:59:22 +02:00
Álvaro Brey
0ac26f557b
UsersDao/Repository: get rid of suspend functions
Signed-off-by: Álvaro Brey <alvaro.brey@nextcloud.com>
2022-07-01 08:59:22 +02:00
Álvaro Brey
f339648875
UsersDao: fix race condition in setUserAsActiveWithId
Make the method return a Single instead, and don't make it a suspend function

Signed-off-by: Álvaro Brey <alvaro.brey@nextcloud.com>
2022-07-01 08:59:22 +02:00
Andy Scherzinger
205292f9b0
fix review comments
Co-authored-by: Álvaro Brey <alvaro.brey@nextcloud.com>
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2022-07-01 08:59:21 +02:00
Andy Scherzinger
12f793567e
add arbitrary storage business layer
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2022-07-01 08:59:21 +02:00
Andy Scherzinger
ad223155d7
Deprecate UserUtils
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2022-07-01 08:59:21 +02:00
Andy Scherzinger
a99a173612
fix getUsersScheduledForDeletion query
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2022-07-01 08:59:21 +02:00
Andy Scherzinger
3ccf41d1a6
fix getUsers query
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2022-07-01 08:59:20 +02:00
Andy Scherzinger
f1dff03188
fix upsert logic for users
Co-authored-by: Álvaro Brey <alvaro.brey@nextcloud.com>
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2022-07-01 08:59:20 +02:00
Andy Scherzinger
dc83403606
Move from Single to Maybe
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2022-07-01 08:59:20 +02:00
Andy Scherzinger
6497c2d9b1
fix crash when navigating back from chat to conversation list
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2022-07-01 08:59:19 +02:00
Andy Scherzinger
9a66240fe5
run DB part with blockingGet
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2022-07-01 08:59:19 +02:00
Andy Scherzinger
ffe41182d1
fix tests
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2022-07-01 08:59:19 +02:00
Andy Scherzinger
85012e1acb
remove unused variable
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2022-07-01 08:59:18 +02:00
Andy Scherzinger
5742927ae8
remove unused method
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2022-07-01 08:59:18 +02:00
Andy Scherzinger
1e753e0250
Deprecate old interfaces and util classes and reference new one
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2022-07-01 08:59:17 +02:00
Andy Scherzinger
9f43eb5278
Rename CapabilitiesNgNew to CapabilitiesUtilNew and mark old one as deprecated
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2022-07-01 08:59:17 +02:00
Andy Scherzinger
9b55241881
remove unneeded @Serializable
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2022-07-01 08:59:17 +02:00
Andy Scherzinger
3b1d4b86a9
Add model to ArbitraryStorage db layer
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2022-07-01 08:59:16 +02:00
Andy Scherzinger
a207ad7b97
Rename ArbitraryStorageNgEntity to ArbitraryStorageEntity
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2022-07-01 08:59:16 +02:00
Andy Scherzinger
84c1874284
simplify call chain
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2022-07-01 08:59:16 +02:00
Andy Scherzinger
443110557c
further renames for UserEntity
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2022-07-01 08:59:16 +02:00
Andy Scherzinger
9d4b6b4392
remove serializable annotation on room entities
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2022-07-01 08:59:15 +02:00
Andy Scherzinger
4233e1bbc1
Rename UserNgEntity to UserEntity
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2022-07-01 08:59:15 +02:00
Andy Scherzinger
25a5346435
unify room converter's json handling to always use LoganSquare
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2022-07-01 08:59:15 +02:00
Andy Scherzinger
2a0ee1c90d
move extension functions to methods
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2022-07-01 08:59:14 +02:00
Andy Scherzinger
223bc6302c
remove unneeded comment
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2022-07-01 08:59:14 +02:00
Andy Scherzinger
c9ba0fe870
annotate JvmStatic for more idiomatic access from Java
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2022-07-01 08:59:14 +02:00
Andy Scherzinger
74fc56fa7e
Replace Observable with Single, let Repositories serve Models
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2022-07-01 08:59:14 +02:00
Andy Scherzinger
359104d6ba
rename to isDbRoomMigrated and setDbRoomMigrated for proper kotlin interoperability
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2022-07-01 08:59:13 +02:00
Álvaro Brey
afbec06ad3
WIP improvements during pair programming call
Signed-off-by: Álvaro Brey <alvaro.brey@nextcloud.com>
2022-07-01 08:59:13 +02:00
Andy Scherzinger
5881e5021c
make disposal of searchViewDisposable null-safe
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2022-07-01 08:59:13 +02:00
Andy Scherzinger
d3286bf6bc
update test cases
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2022-07-01 08:59:12 +02:00
Andy Scherzinger
55585e9ef0
Room db schema v8
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2022-07-01 08:59:12 +02:00
Andy Scherzinger
5c7e4f1248
generate room schema definition for documentation
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2022-07-01 08:59:12 +02:00
Andy Scherzinger
925691299a
ignore spotbugs correctness for an android api array access with fixed index
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2022-07-01 08:59:12 +02:00
Andy Scherzinger
565903b956
remove flow and use rx
...to stay in line with currently used concepts

Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2022-07-01 08:59:11 +02:00
Álvaro Brey
f7786e1b93
Fix flow listening in SettingsController
Signed-off-by: Álvaro Brey <alvaro.brey@nextcloud.com>
2022-07-01 08:59:11 +02:00
Andy Scherzinger
27d5059e92
trying to extract flow value
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2022-07-01 08:59:10 +02:00
Andy Scherzinger
f7ca1ec804
DB version switcher for requery
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2022-07-01 08:59:10 +02:00
Andy Scherzinger
d55c3fa68e
Log db migrations
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2022-07-01 08:59:10 +02:00
Andy Scherzinger
8c27b54377
move everything to flows
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2022-07-01 08:59:09 +02:00
Andy Scherzinger
730aeb2944
fix detekt and ktlint issues
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2022-07-01 08:59:09 +02:00
Andy Scherzinger
5ffa3c44fd
create new capabilities util add license header and format kotlin code
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2022-07-01 08:59:08 +02:00
Andy Scherzinger
75c8625aee
run user repo call in coroutine
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2022-07-01 08:59:08 +02:00
Andy Scherzinger
349d5fe19b
dual-mode of DB fpr requery and room
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2022-07-01 08:59:08 +02:00
Andy Scherzinger
05db482d06
adding arbitrary storage implementation, initial steps towards new util classes
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2022-07-01 08:59:07 +02:00
Andy Scherzinger
db1dd66204
port room database layer from master-broken to up-to-date master
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2022-07-01 08:58:56 +02:00
Nextcloud bot
d09f6aceef
[tx-robot] updated from transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2022-07-01 04:24:09 +00:00
Nextcloud bot
f0b865ca46
[tx-robot] updated from transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2022-06-30 04:12:39 +00:00
Nextcloud bot
199d5a6ba6
[tx-robot] updated from transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2022-06-29 04:17:42 +00:00
Álvaro Brey
e176b38d8b
NewBaseController: Inject kotlin fields without @JvmField and nullable type
These do not need to be nullable as they will be injected immediately.
This will make child controllers code much cleaner.

Signed-off-by: Álvaro Brey <alvaro.brey@nextcloud.com>
2022-06-28 17:00:01 +02:00
Nextcloud bot
311b999174
[tx-robot] updated from transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2022-06-28 04:24:45 +00:00
Nextcloud bot
8fde68f362
[tx-robot] updated from transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2022-06-27 04:14:07 +00:00
Nextcloud Android Bot
a6b80fb3c4 Weekly 14.1.0 Alpha 11 2022-06-27 03:13:07 +00:00
Nextcloud bot
d698aa620b
[tx-robot] updated from transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2022-06-26 04:12:07 +00:00
Nextcloud bot
0bb4a0da24
[tx-robot] updated from transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2022-06-25 04:13:45 +00:00
Tim Krüger
a5677872b3
Merge pull request #2160 from nextcloud/bugfix/2132/android-build-dependend-bluetooth-permissions-2
Implement comments by PR #2139
2022-06-24 17:51:34 +02:00
Nextcloud bot
0c18edf4c1
[tx-robot] updated from transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2022-06-24 04:13:16 +00:00
Tim Krüger
834d310eb8
Use simple class name for logging
Signed-off-by: Tim Krüger <t@timkrueger.me>
2022-06-23 15:35:42 +02:00
Tim Krüger
f87e0a2d85
Set PendingIntent flag immutable
Signed-off-by: Tim Krüger <t@timkrueger.me>
2022-06-23 15:34:11 +02:00
Tim Krüger
174a7e53d8
Remove unneeded '@SuppressLint("InlinedApi")'
The annotation '@RequiresApi' was already set correctly.

Signed-off-by: Tim Krüger <t@timkrueger.me>
2022-06-23 15:24:28 +02:00
Tim Krüger
10a4521af9
Rename 'WebRtcAudioManger' to 'WebRtcAudioManager'
Signed-off-by: Tim Krüger <t@timkrueger.me>
2022-06-23 15:20:32 +02:00
Tim Krüger
c13d23bda2
Make PendingIntent flag immutable
Signed-off-by: Tim Krüger <t@timkrueger.me>
2022-06-23 15:16:54 +02:00
Tim Krüger
0f8830df89
Use log level exception for exceptions
Also log the exception itself instead of the localized message
concatinated in the log message.

Signed-off-by: Tim Krüger <t@timkrueger.me>
2022-06-23 15:00:13 +02:00
drone
272f2e839c Merge commit '58c40e6ee244e6b78cc8754e8cc621e8400507d7' 2022-06-23 08:59:34 +00:00
Tim Krüger
58c40e6ee2
Remove annotation '@JvmField'
Replace the '@JvmField' with the Kotlin way 'lateinit'.

Signed-off-by: Tim Krüger <t@timkrueger.me>
2022-06-23 10:59:14 +02:00
Tim Krüger
5b5db208ee
Rename 'MagicFirebaseMessagingService'
Renamed the service to 'ChatAndCallMessagingService' to respect that the
service handles chat messages and calls.

Signed-off-by: Tim Krüger <t@timkrueger.me>
2022-06-23 10:22:23 +02:00
Andy Scherzinger
331309405d
Set intent flag required by Android 12 (SDK 31)
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2022-06-23 10:21:03 +02:00
Álvaro Brey
c4d9105613
Merge pull request #2148 from nextcloud/fix/callactivity-receiver
Use custom permission for unfiltered broadcast receiver in CallActivity
2022-06-23 09:36:00 +02:00
Nextcloud bot
32133b693c
[tx-robot] updated from transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2022-06-23 04:13:53 +00:00
Tim Krüger
738ed94f98
Add foreground service type to MagicFirebaseMessagingService
Since SDK 31 foreground services can't start while running in
background, except for a few special cases like phone calls.

See:
 - https://developer.android.com/guide/components/foreground-services#background-start-restrictions

Signed-off-by: Tim Krüger <t@timkrueger.me>
2022-06-22 15:51:17 +02:00
drone
655e4ac0cd Merge commit 'f366c75f68be62d31702c5bcbe14e22548627245' 2022-06-22 13:39:24 +00:00
Nextcloud bot
a6e1a143fa
[tx-robot] updated from transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2022-06-22 13:37:30 +00:00
Tim Krüger
f366c75f68
Add mandetory intent flags
Since SDK 31 for an 'PendingIntent' the intent flags 'FLAG_IMMUTABLE' or
'FLAG_IMMUTABLE' are mandetory.

Signed-off-by: Tim Krüger <t@timkrueger.me>
2022-06-22 15:33:26 +02:00
Marcel Hibbe
79b27385b7
add string "Upload from device"
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2022-06-22 14:47:45 +02:00
Marcel Hibbe
8c28a900be
delete string "upload local file"
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2022-06-22 14:42:28 +02:00
Andy Scherzinger
3096d90bc6
only set intent flag for sdk>=31
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2022-06-22 11:21:46 +02:00
drone
4b67a71ff4 Merge commit '1f936cb677ed17f93fba461ae59ac84bda5e99db' 2022-06-22 09:00:28 +00:00
Andy Scherzinger
1f936cb677
migrate to sdk=31
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2022-06-22 10:59:38 +02:00
Tim Krüger
6e4841ae3a
Rename 'MagicAudioManager' and 'MagicBluetoothManager'
It's not magic but WebRtc related.

Signed-off-by: Tim Krüger <t@timkrueger.me>
2022-06-21 15:13:47 +02:00
Tim Krüger
e14f00fae7
Request 'BLUETOOTH_CONNECT' permissions
Request the 'BLUETOOTH_CONNECT' permissions if not already granted.

If the permission is be granted in this request, the
'MagicBluetoothManger' will be started.

See: #2132

Signed-off-by: Tim Krüger <t@timkrueger.me>
2022-06-21 15:13:40 +02:00
Nextcloud Android Bot
266034b00e Weekly 14.1.0 Alpha 10 2022-06-20 03:13:55 +00:00
Nextcloud bot
b5ba536888
[tx-robot] updated from transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2022-06-19 04:16:32 +00:00
Andy Scherzinger
205d00d443
harmonize license header in java/kt files
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2022-06-18 16:42:53 +02:00
Andy Scherzinger
0b2b0cca51
Use proper Android logger
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2022-06-18 16:36:02 +02:00
Andy Scherzinger
49792ecf1e
rename blacklist/whitelist variables to include/exclude sets to reflect their collection type
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2022-06-18 16:29:57 +02:00
Andy Scherzinger
61ec38dd5e
replace deprecated listener due to update to exoplayer 2.18.0
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2022-06-18 16:25:27 +02:00
dependabot[bot]
ffb1930161
Bump exoplayer from 2.17.1 to 2.18.0
Bumps [exoplayer](https://github.com/google/ExoPlayer) from 2.17.1 to 2.18.0.
- [Release notes](https://github.com/google/ExoPlayer/releases)
- [Changelog](https://github.com/google/ExoPlayer/blob/release-v2/RELEASENOTES.md)
- [Commits](https://github.com/google/ExoPlayer/compare/r2.17.1...r2.18.0)

---
updated-dependencies:
- dependency-name: com.google.android.exoplayer:exoplayer
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-18 14:12:11 +00:00
Andy Scherzinger
993e50dbdb
rename variable to reflect its collection type
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2022-06-18 15:37:42 +02:00
Andy Scherzinger
34f8bb5ab7
use fixed strings where possible to limit lint score bump
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2022-06-18 15:25:11 +02:00
Andy Scherzinger
cd44de757c
code reformatting
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2022-06-18 15:17:08 +02:00
Andy Scherzinger
08f5274af9
add cipher migration for version 4 of sqlcipher
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2022-06-18 14:44:45 +02:00
Tim Krüger
dedbe40cc0
Launch 'MagicBluetoothManager' independently
This change is needed to make the 'MagicBluetoothManager' startable
after the from Android SDK 31 introduced BLUETOOTH_CONNECT is granted by
the user.

Before this change the 'MagicBluetoothManager' was only started in
'MagicAudioManager#start'. Now the new method
'MagicAudioManager#startBluetoothManager' can be used to start the
'MagicBluetoothManager'.

This change is also a preperation to fix #1309 and #2114.

See: #2132, #1309, #2124

Signed-off-by: Tim Krüger <t@timkrueger.me>
2022-06-17 15:51:44 +02:00
Tim Krüger
4821b02729
Add Android build switch for checking bluetooth permissions
Refactored method 'hasPermission' to 'hasNoBluetoothPermission'. The new method
respect the in SKD 31 introduced permission BLUETOOTH_CONNECT. For older SDK
versions the permission BLUETOOTH will be used.

Additionaly make methods private which need bluetooth permissions and only
called locally. For public methods which need bluetooth permissions the method
'hasNoBluetoothPermission' is called to check them.
Also add suppress lint annotation for 'MissingPermission'.

From SDK 30 to SDK 31 the bluetooth related permissions changed and it
is suggested to add the attribute 'android:maxSdkVersion="30"' to the
legacy BLUETOOTH permission in the 'AndroidManifest.xml' [1]:

> For your legacy Bluetooth-related permission declarations, set
> android:maxSdkVersion to 30. This app compatibility step helps the system
> grant your app only the Bluetooth permissions that it needs when installed
> on devices that run Android 12 or higher.

This is explicitly not done here!

During runtime (on Android 12) while starting the 'MagicBluetoothManger' the
following part in 'android.bluetooth.BluetootHeadset' constructor will be
executed and results in the previous exception:

  // Preserve legacy compatibility where apps were depending on
  // registerStateChangeCallback() performing a permissions check which
  // has been relaxed in modern platform versions
  if (context.getApplicationInfo().targetSdkVersion <= Build.VERSION_CODES.R
           && context.checkSelfPermission(android.Manifest.permission.BLUETOOTH)
                   != PackageManager.PERMISSION_GRANTED) {
     throw new SecurityException("Need BLUETOOTH permission");
 }

In the 'build.gradle' the 'targetSdkVersion 30' and 'compileSdkVersion 31' is
configured. Because the 'MagicBluetoothManager' checks for the 'targetSdkVersion'
instead of 'Build.VERSION.SDK_INT' also on a Android 12 (SDK 31) the 'BLUETOOTH'
permission is needed.

So the solution is to don't set `android:maxSdkVersion="30"' for the BLUETOOTH
permission and request the BLUETOOTH_CONNECT permission.

Resolves: #2132
See:
  [1] https://web.archive.org/web/20220416121005/https://developer.android.com/guide/topics/connectivity/bluetooth/permissions#declare-android12-or-higher

Signed-off-by: Tim Krüger <t@timkrueger.me>
2022-06-17 15:51:44 +02:00
dependabot[bot]
a7751124a1
Bump android-database-sqlcipher from 3.5.9 to 4.5.1
Bumps [android-database-sqlcipher](https://github.com/sqlcipher/android-database-sqlcipher) from 3.5.9 to 4.5.1.
- [Release notes](https://github.com/sqlcipher/android-database-sqlcipher/releases)
- [Commits](https://github.com/sqlcipher/android-database-sqlcipher/compare/v3.5.9...v4.5.1)

---
updated-dependencies:
- dependency-name: net.zetetic:android-database-sqlcipher
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-17 13:47:36 +02:00
Álvaro Brey
c9706089d6
Merge pull request #2145 from nextcloud/dependabot/gradle/okhttpVersion-4.10.0
Bump okhttpVersion from 4.9.3 to 4.10.0
2022-06-16 12:26:52 +02:00
Nextcloud bot
83fd3c85a8
[tx-robot] updated from transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2022-06-16 04:16:12 +00:00
dependabot[bot]
3b996c43f7
Bump okhttpVersion from 4.9.3 to 4.10.0
Bumps `okhttpVersion` from 4.9.3 to 4.10.0.

Updates `okhttp` from 4.9.3 to 4.10.0
- [Release notes](https://github.com/square/okhttp/releases)
- [Changelog](https://github.com/square/okhttp/blob/master/CHANGELOG.md)
- [Commits](https://github.com/square/okhttp/compare/parent-4.9.3...parent-4.10.0)

Updates `okhttp-urlconnection` from 4.9.3 to 4.10.0
- [Release notes](https://github.com/square/okhttp/releases)
- [Changelog](https://github.com/square/okhttp/blob/master/CHANGELOG.md)
- [Commits](https://github.com/square/okhttp/compare/parent-4.9.3...parent-4.10.0)

Updates `logging-interceptor` from 4.9.3 to 4.10.0
- [Release notes](https://github.com/square/okhttp/releases)
- [Changelog](https://github.com/square/okhttp/blob/master/CHANGELOG.md)
- [Commits](https://github.com/square/okhttp/compare/parent-4.9.3...parent-4.10.0)

---
updated-dependencies:
- dependency-name: com.squareup.okhttp3:okhttp
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: com.squareup.okhttp3:okhttp-urlconnection
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: com.squareup.okhttp3:logging-interceptor
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-16 01:06:55 +00:00
Marcel Hibbe
c628c23557 fix to load conversation list (restricted user status)
when the user status app on server is restricted to only some groups, the capabilities for users that are excluded still contains the "user_status" capability.
For the android talk app, this caused that the conversations were not shown.
With this fix, the conversations will be loaded also if the "user_status" is mistakenly set. Additionally, the option to set the status will be hidden.

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2022-06-15 13:45:53 +00:00
Andy Scherzinger
bb99161e63
Merge pull request #2149 from nextcloud/dependabot/gradle/com.bluelinelabs-conductor-3.1.5
Bump conductor from 3.1.4 to 3.1.5
2022-06-15 14:54:04 +02:00
Nextcloud bot
7543e74d2f
[tx-robot] updated from transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2022-06-15 04:19:02 +00:00
dependabot[bot]
43853e1896
Bump conductor from 3.1.4 to 3.1.5
Bumps [conductor](https://github.com/bluelinelabs/Conductor) from 3.1.4 to 3.1.5.
- [Release notes](https://github.com/bluelinelabs/Conductor/releases)
- [Commits](https://github.com/bluelinelabs/Conductor/compare/3.1.4...3.1.5)

---
updated-dependencies:
- dependency-name: com.bluelinelabs:conductor
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-15 01:09:14 +00:00
Álvaro Brey
bb7e82fbcb
Use custom permission for unfiltered broadcast receiver in CallActivity
Signed-off-by: Álvaro Brey <alvaro.brey@nextcloud.com>
2022-06-14 15:51:04 +02:00
Nextcloud bot
67298a63e6
[tx-robot] updated from transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2022-06-14 04:21:37 +00:00
Nextcloud Android Bot
d0ea659845 Weekly 14.1.0 Alpha 09 2022-06-13 03:23:43 +00:00
Nextcloud bot
1419abd101
[tx-robot] updated from transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2022-06-12 04:21:58 +00:00
Andy Scherzinger
c0100c5a16
bump buildToolsVersion from 32.0.0 to 33.0.0
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2022-06-10 13:33:34 +02:00
Andy Scherzinger
dd129b4e6c
further centralize mimetype definitions
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2022-06-10 13:13:37 +02:00
Andy Scherzinger
444ff05cf5
centralize mime type definitions
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2022-06-09 21:02:31 +02:00
Álvaro Brey
49d2f40e3f ProfileController: fix non-exhaustive when
Crashes Kotlin 1.7.0

Signed-off-by: Álvaro Brey <alvaro.brey@nextcloud.com>
2022-06-09 17:57:01 +00:00
Andy Scherzinger
c6f8c60550
Merge pull request #2086 from nextcloud/chore/noid/RemoteBrowserMigration
Remote files browser migration
2022-06-09 15:40:14 +02:00
Andy Scherzinger
3e99dc065b
improve code base from review comments
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2022-06-09 12:03:03 +02:00
Andy Scherzinger
3d0f154d7d
simplify worker call
Co-authored-by: Álvaro Brey <alvaro.brey@nextcloud.com>
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2022-06-09 12:03:03 +02:00
Nextcloud bot
45c33de776
[tx-robot] updated from transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2022-06-09 04:25:53 +00:00
Andy Scherzinger
8c9cf2e06f
remove unused string
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2022-06-09 00:19:29 +02:00