Skip to content

Move to compile target Marshmallow (Android 6 - v23) - rebased without FAB - #1473

Merged
masensio merged 22 commits into
masterfrom
target_marshmallow_rebased
Feb 19, 2016
Merged

masensio merged 22 commits into
masterfrom
target_marshmallow_rebased

Conversation

@davivel

@davivel davivel commented Feb 12, 2016

Copy link
Copy Markdown
Contributor

This Branch is not based on material_fab.

Works for gradle and ant.

What has been done so far:

@davivel

davivel commented Feb 12, 2016

Copy link
Copy Markdown
Contributor Author

How got here:

  1. git rebase --onto master material_fab target_mashmallow; resolved some conflicts in the process, including removal of dependency on FAB library in build.gradle and setup_* files
  2. git cherry-pick e494737
  3. git cherry-pick a55e01c

@davivel davivel changed the title Move to compile target Marshmallow (Android 6 - v23) - rebased without FAB [WIP] Move to compile target Marshmallow (Android 6 - v23) - rebased without FAB Feb 12, 2016
@davivel

davivel commented Feb 12, 2016

Copy link
Copy Markdown
Contributor Author

Checking updated documentation about GET_ACCOUNTS permissions, maybe we don't need to add the permission check for it: http://developer.android.com/intl/es/reference/android/Manifest.permission.html#GET_ACCOUNTS_PRIVILEGED

In any case, still needs to be in the manifest for Android <=5.1

@davivel

davivel commented Feb 12, 2016

Copy link
Copy Markdown
Contributor Author

Tested: there is no need to check in runtime the if GET_ACCOUNTS is granted or not; since the app only uses its own accounts, the permissions is not really required from Android 6. If was really needed, the line https://github.com/owncloud/android/blob/master/src/com/owncloud/android/authentication/AccountUtils.java#L88 would be failing when the app has no permission on CONTACTS group, and that's not happening.

@AndyScherzinger

Copy link
Copy Markdown
Contributor

@davivel thanks for the rebase, great collaboration! Again! 👍
I am running the build on my phone (Android 6.0.1) since Saturday without any errors. The setup.md had some merge conflicts which I resolved and also fixed the formatting of the unordered lists (https://github.com/owncloud/android/blob/target_marshmallow_rebased/SETUP.md), sorry for the amount of commits...I had to push to see if the formatting worked a couple of times.

Remarks:

  • One thing I experienced is that the permissions only get asked for on a real device (!). For some reason an emulator with Android v23 "just works" and does not ask for the permission to be granted. This only happens on my Nexus5X. So to test this, one needs to have a phone running Marshmallow... 😞
  • As for the permissions API calls: We now have a simple implementation which could be considered enough for the moment. It checks the permissions during startup and reacts to the different scenarios (granted, not granted, revoked). What is missing in case we want to add that are check in all places where the permission is needed in case someone revokes the right at runtime with the app already running and then jumps to the app again and tries to do a manual upload which would fail due t the then missing right. This scenario though is a Android v23+ only scenario. In case we are fine with the current check the branch can be considered "development done" imho.

Any discussion about this PR (and screenshots) can be found here: #1343

… permissions behaviour for API level >= 23 in AndroidManifest.xml
@davivel davivel changed the title [WIP] Move to compile target Marshmallow (Android 6 - v23) - rebased without FAB Move to compile target Marshmallow (Android 6 - v23) - rebased without FAB Feb 16, 2016
@davivel

davivel commented Feb 16, 2016

Copy link
Copy Markdown
Contributor Author

Thanks a lot, @AndyScherzinger .

No sorry for the tiny commits, pal. Anyway, if you want a challenge, next time you don't like to have so many tiny commits in a row, you can try to squash them. See a couple of references: http://gitready.com/advanced/2009/02/10/squashing-commits-with-rebase.html , https://ariejan.net/2011/07/05/git-squash-your-latests-commits-into-one/ .

About testing in real devices, we have what we need here to test Android 6.

About the permissions handling, I agree that your solution should be enough for the moment, at least to the point that we can test and close #1401. This PR fixes it, as you commented there.

I'll have a look to #1343. Adding some more checks of WRITE_EXTERNAL_STORAGE in FileDownloader and FileUploader could be interesting. In any case, that shouldn't block this PR.

@davivel

davivel commented Feb 16, 2016

Copy link
Copy Markdown
Contributor Author

Oh, and I added some comments in AndroidManifest.xml about the permissions, if you are interested.

@jesmrec , I think testing on #1401 could be started.

@masensio , @malkomich , I made some extra changes by my own, other code review could be convenient. @AndyScherzinger , your comments, of course, are also welcome :)

@AndyScherzinger

Copy link
Copy Markdown
Contributor

Looks good to me 👍

@rperezb

rperezb commented Feb 19, 2016

Copy link
Copy Markdown

@malkomich how does this look to you?

@masensio

Copy link
Copy Markdown

Code reviewed 👍

masensio pushed a commit that referenced this pull request Feb 19, 2016
Move to compile target Marshmallow (Android 6 - v23) - rebased without FAB
@masensio
masensio merged commit 482d43a into master Feb 19, 2016
@masensio
masensio deleted the target_marshmallow_rebased branch February 19, 2016 10:28
@AndyScherzinger AndyScherzinger added this to the 1.9.2-current milestone Mar 14, 2016
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.

5 participants