Skip to content

Conversation

@ezaquarii
Copy link
Collaborator

Fixes #4941

Signed-off-by: Chris Narkiewicz hello@ezaquarii.com

@codecov
Copy link

codecov bot commented Dec 18, 2019

Codecov Report

Merging #5031 into master will increase coverage by 0.03%.
The diff coverage is 72.72%.

@@             Coverage Diff              @@
##             master    #5031      +/-   ##
============================================
+ Coverage     17.58%   17.61%   +0.03%     
  Complexity        3        3              
============================================
  Files           385      385              
  Lines         32679    32681       +2     
  Branches       4594     4594              
============================================
+ Hits           5745     5757      +12     
+ Misses        26008    25993      -15     
- Partials        926      931       +5
Impacted Files Coverage Δ Complexity Δ
...cloud/android/ui/activity/FileDisplayActivity.java 20.19% <66.66%> (-0.02%) 0 <0> (ø)
...com/owncloud/android/ui/activity/BaseActivity.java 36.66% <80%> (+6.32%) 0 <0> (ø) ⬇️
.../third_parties/daveKoeller/AlphanumComparator.java 80.95% <0%> (-1.2%) 0% <0%> (ø)
...loud/android/datamodel/ThumbnailsCacheManager.java 33.75% <0%> (-0.55%) 0% <0%> (ø)
...owncloud/android/ui/adapter/OCFileListAdapter.java 29.86% <0%> (-0.19%) 0% <0%> (ø)
...oud/android/ui/activity/SyncedFoldersActivity.java 26.31% <0%> (ø) 0% <0%> (ø) ⬇️
...xtcloud/client/account/UserAccountManagerImpl.java 58.27% <0%> (+7.91%) 0% <0%> (ø) ⬇️

@ezaquarii
Copy link
Collaborator Author

ezaquarii commented Dec 18, 2019

@tobiasKaminsky When creating new account, I see that we jump through 5 activities.

FileDisplayActivity 1 -> AuthenticatorActivity -> FirstRunActivity -> FileDisplayActivity 2 -> FileDisplayActivity 3

FileDisplayActivity 2 is for some reason resumed and paused few times before FileDisplayActivity 3 comes to life.

The whole flow is pretty complicated and I believe we could simplify it just a bit by removing the authenticator callback in FileDisplayActivity 1, as it dies immediately after launching AuthenticatorActivity.

if (newAccount == null) {
/// no account available: force account creation
createAccount(true);
finish();
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried to run it without it. I managed to create the account properly, but it landed in empty file list activity as a result, requiring extra pull-to-refresh.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have somewhere a delay of 500ms to do a very first loading of folder content, maybe it just takes a bit too long for you.

Fixes #4941

Signed-off-by: Chris Narkiewicz <hello@ezaquarii.com>
@ezaquarii ezaquarii force-pushed the ezaquarii/fix-npe-crash-when-storage-manager-is-not-set branch from 2dc858c to 3f3c5a1 Compare December 19, 2019 00:28
@nextcloud-android-bot
Copy link
Collaborator

APK file: https://www.kaminsky.me/nc-dev/android-artifacts/12049.apk

qrcode

To test this change/fix you can simply download above APK file and install and test it in parallel to your existing Nextcloud app.

@nextcloud-android-bot
Copy link
Collaborator

Codacy

328

Lint

TypemasterPR
Warnings7373
Errors00

SpotBugs (new)

Warning TypeNumber
Bad practice Warnings26
Correctness Warnings70
Internationalization Warnings13
Malicious code vulnerability Warnings5
Multithreaded correctness Warnings9
Performance Warnings106
Security Warnings44
Dodgy code Warnings136
Total409

@tobiasKaminsky
Copy link
Member

The whole flow is pretty complicated

it is indeed.
As old login flow is deprecated since NC12, I will remove this for 3.11.
This then should simplify it a lot and I will take your idea into account.

@tobiasKaminsky tobiasKaminsky merged commit d7d1c47 into master Jan 6, 2020
@delete-merged-branch delete-merged-branch bot deleted the ezaquarii/fix-npe-crash-when-storage-manager-is-not-set branch January 6, 2020 14:35
@AndyScherzinger AndyScherzinger added this to the Nextcloud App 3.10.0 milestone Jan 6, 2020
tobiasKaminsky added a commit that referenced this pull request Jan 7, 2020
f690417 Merge pull request #5102 from nextcloud/removeNC12
051423c remove support for NC12
d7d1c47 Merge pull request #5031 from nextcloud/ezaquarii/fix-npe-crash-when-storage-manager-is-not-set
9b79b85 Merge pull request #5065 from nextcloud/ezaquarii/fix-crash-when-making-new-ods-file
32ebe69 Merge pull request #5066 from nextcloud/ezaquarii/fix-shared-by-null-glitch
6e07d18 Merge pull request #5035 from nextcloud/enh/clickableMarkdownLinks
5fce6ca Removed unneeded try/catch
a680697 Removed unneeded try/catch
154b9af adjusted to master
a15f724 Make hyperlinks clickable in markdown previews
5f70ea6 Make hyperlinks clickable in markdown previews
cd0f834 [tx-robot] updated from transifex
22ab16e [tx-robot] updated from transifex
80d7d26 [tx-robot] updated from transifex
6d76582 [tx-robot] updated from transifex
167b250 Merge pull request #5085 from nextcloud/dependabot/gradle/junit-junit-4.13
7b6e1b7 [tx-robot] updated from transifex
1c12ca0 Bump junit from 4.12 to 4.13
71f919f [tx-robot] updated from transifex
fc00d7d Merge pull request #5077 from nextcloud/dependabot/gradle/daggerVersion-2.25.4
9a3bf3a Bump daggerVersion from 2.25.3 to 2.25.4
0c3b8fc [tx-robot] updated from transifex
ef84976 Fix "Shared by null" glitch in file details view
3cf3e3b Fix crash when adding new ODS file
2047079 Merge pull request #5060 from nextcloud/dependabot/gradle/io.gitlab.arturbosch.detekt-detekt-gradle-plugin-1.3.0
2882236 Bump detekt-gradle-plugin from 1.2.2 to 1.3.0
3687301 [tx-robot] updated from transifex
f53d637 [tx-robot] updated from transifex
24921f6 [tx-robot] updated from transifex
c30c6c7 daily dev 20191221
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Crash on first installation due to missing storageManager

5 participants