Skip to content
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

Remove Login Flow v1 #14461

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Remove Login Flow v1 #14461

wants to merge 1 commit into from

Conversation

alperozturk96
Copy link
Collaborator

@alperozturk96 alperozturk96 commented Jan 24, 2025

  • Tests written, or not not needed

Android 8

a8.mp4

Android 15

a15.mp4

Signed-off-by: alperozturk <[email protected]>
@@ -253,9 +225,6 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
private String token;

private boolean onlyAdd = false;
@SuppressLint("ResourceAsColor") @ColorInt
private int primaryColor = R.color.primary;
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Unused variable after removing the login flow v1

Copy link

Codacy

Lint

TypemasterPR
Warnings5559
Errors33

SpotBugs

CategoryBaseNew
Bad practice6565
Correctness5757
Dodgy code294292
Experimental11
Internationalization77
Malicious code vulnerability11
Multithreaded correctness77
Performance5353
Security1818
Total503501

Lint increased!

Copy link

APK file: https://www.kaminsky.me/nc-dev/android-artifacts/14461.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.

@@ -1043,24 +895,6 @@ private void onGetServerInfoFinish(RemoteOperationResult result) {
webViewPassword != null && !webViewPassword.isEmpty()) {
checkBasicAuthorization(webViewUser, webViewPassword);
} else {
new Thread(() -> {
Copy link
Collaborator Author

@alperozturk96 alperozturk96 Jan 24, 2025

Choose a reason for hiding this comment

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

This remote operation is only used for the primaryColor. Since primaryColor is not used, no need for this remote operation.

@@ -421,9 +384,8 @@ public void onNothingSelected(AdapterView<?> parent) {

private void deleteCookies() {
try {
CookieSyncManager.createInstance(this);
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

No need to use CookieSyncManager. Document

CookieManager.getInstance().removeAllCookies(null);
} catch (AndroidRuntimeException e) {
Copy link
Collaborator Author

@alperozturk96 alperozturk96 Jan 24, 2025

Choose a reason for hiding this comment

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

On Android 8, if the device has WebView Shell as the default web browser.

CookieManager.getInstance().removeAllCookies(null);

This function will throw the IllegalArgumentException.

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.

1 participant