-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Android X (P) #2402
Android X (P) #2402
Conversation
Ok, there are some
|
2eea61a
to
3c2c05f
Compare
Thanks a lot for this contribution @hannesa2 , we'd rather not use alpha versions, would it be possible to keep using stable versions just in the alpha ones? By the way, there's some conflicts with master. |
I reverted to stable libs. |
owncloudApp/src/main/java/com/owncloud/android/ui/adapter/LogListAdapter.java
Show resolved
Hide resolved
@hannesa2 apart from the requested changes above, I have compiled the code, install the app and I get the next error when checking the server in login view, which appears as
Maybe we need a security config file now, can you try with the next code?
<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
<base-config cleartextTrafficPermitted="true" />
</network-security-config>
android:networkSecurityConfig="@xml/network_security_config" |
Indeed this |
Removing this |
Exactly #934 ! (but I it's almost 3 years just an idea) And one more additional step could be a 2 phase authentication, like Google does when a new IP/device tries to connect with a mail notification/confirmation. But with this, the backend needs some work. But to be honest, this needs too much live/spare time from my side. When it comes to my focus I can open a ticket for sure, but currently my main interest is the non working (already closed) upload #2394 |
What should be done here ? |
@hannesa2 @michaelstingl @jesmrec
I would not get rid of http IMHO, is insecure for sure but ownCloud is a self-hosted solution and therefore, each end user/company should be the responsible for the security of his ownCloud instance. Disallowing http will likely trigger complains since we are making decisions that do not belong to us.
About this, I think that we are already checking the SSL certificate against a stored one, as is suggested in #934. Have a look at https://github.com/owncloud/android-library/blob/940f0b9bb042e3c318e4cbeff71782e0d8733f93/owncloudComLibrary/src/main/java/com/owncloud/android/lib/common/http/HttpClient.java#L78. |
@hannesa2 can you please apply the changes about http and foreground services so we can push this to be included in 2.10.0? Thanks |
http : |
Foreground Service: I added the missing ones, but to be honest I did only code changes and didn't test it. In following files, in my point of view, there are too much conditions to run into FileDownloader.java FileUploader.java |
You have a comment just below that line that explains why do we need those checks. We create the service to check available offline files and retry downloads by using android/owncloudApp/src/main/java/com/owncloud/android/files/services/FileDownloader.java Lines 193 to 197 in 2b15b5b
Have a look at the comment below: android/owncloudApp/src/main/java/com/owncloud/android/files/services/FileUploader.java Lines 300 to 304 in 2b15b5b
|
My opinion is, it's just necessary to test latest commit |
please test it first. Without it, we've seen a crash #2402 (comment) |
As I explained in #2402 (comment), I tested without it and I'm not getting that crash but the notification error. @jesmrec can you please test af756ba and confirm there's no crash there? If so, we can remove the |
With commit 4064941:
With commit 6ed4d30
with commit 72a4297 (the latest one)
so, good news. In any case, a deeper testing should be performed to assure all scenarios are OK, but this is out of the scope of the current one. |
@hannesa2 i have rechecked the whole feature by dropping the commit c2db38e, and it works properly. No crashes in authentication and uploads run correctly (camera uploads and manual uploads). Maybe we can get rid of such commit, so it does not introduce anything sensible for the described feature, and will make a cleaner history. Sorry for the noise. |
ok, I removed the
commit, and kept all except my fix. (To be honest, because it worked for me before, I simply followed your suggestion and didn't tested it) |
a404aeb
to
a111f26
Compare
After a new check:
We can move forward, and new checks will be performed in the following release stage. Approved |
Please, update the branch for the final merge |
Sounds good ! Rebase is done |
I was forced to use Android P as well, so it's the move to P as well
Edited by @davigonz
About Android P, I'm gathering some changes from here that might affect the ownCloud Android app when targeting Android P:
Network TLS enabled by default: if your app targets Android 9 or higher, the isCleartextTrafficPermitted() method returns false by default. If your app needs to enable cleartext for specific domains, you must explicitly set cleartextTrafficPermitted to true for those domains in your app's Network Security Configuration. Reproducible and fix in Android X (P) #2402 (comment)
Foreground services: apps that target Android P or higher and use foreground services must request the FOREGROUND_SERVICE permission. E.g.: https://github.com/owncloud/android/blob/master/owncloudApp/src/main/java/com/owncloud/android/files/services/FileUploader.java#L306
CC @jesmrec @hannesa2
BUGS & IMPROVEMENTS