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

update SSO Lib from 1.1.0 -> 1.3.2 #1473

Merged
merged 1 commit into from
Feb 15, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions News-Android-App/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ dependencies {
// implementation 'com.google.android.gms:play-services:4.2.42'
// implementation project(path: ':MaterialShowcaseView:library', configuration: 'default')
// implementation project(':Android-SingleSignOn:lib')
implementation 'com.github.nextcloud:Android-SingleSignOn:1.1.0'
implementation 'com.github.nextcloud:Android-SingleSignOn:1.3.2'
implementation "androidx.core:core:1.13.1"
implementation 'androidx.annotation:annotation:1.8.0'
implementation "androidx.appcompat:appcompat:1.7.0"
Expand Down Expand Up @@ -185,7 +185,7 @@ dependencies {
implementation "com.squareup.okhttp3:okhttp:${OKHTTP_VERSION}"
implementation "com.squareup.okhttp3:logging-interceptor:${OKHTTP_VERSION}"

coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.0.4'
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.1.2'

testImplementation 'junit:junit:4.13.2'
testImplementation("org.mockito:mockito-core:$MOCKITO_VERSION") {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,14 @@
import androidx.appcompat.app.AppCompatActivity;

import com.nextcloud.android.sso.AccountImporter;
import com.nextcloud.android.sso.FilesAppTypeRegistry;
import com.nextcloud.android.sso.api.NextcloudAPI;
import com.nextcloud.android.sso.exceptions.AccountImportCancelledException;
import com.nextcloud.android.sso.exceptions.AndroidGetAccountsPermissionNotGranted;
import com.nextcloud.android.sso.exceptions.NextcloudFilesAppNotInstalledException;
import com.nextcloud.android.sso.exceptions.NextcloudHttpRequestFailedException;
import com.nextcloud.android.sso.helper.SingleAccountHelper;
import com.nextcloud.android.sso.helper.VersionCheckHelper;
import com.nextcloud.android.sso.model.FilesAppType;
import com.nextcloud.android.sso.model.SingleSignOnAccount;
import com.nextcloud.android.sso.ui.UiExceptionManager;

Expand Down Expand Up @@ -148,7 +148,8 @@ protected void onStop() {
}

public void startSingleSignOn() {
if (!VersionCheckHelper.verifyMinVersion(LoginDialogActivity.this, MIN_NEXTCLOUD_FILES_APP_VERSION_CODE, FilesAppType.PROD)) {
var type = FilesAppTypeRegistry.getInstance().findByAccountType("nextcloud"); // prod
if (!VersionCheckHelper.verifyMinVersion(LoginDialogActivity.this, MIN_NEXTCLOUD_FILES_APP_VERSION_CODE, type)) {
// Dialog will be shown automatically
return;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
import androidx.appcompat.app.AppCompatActivity;
import androidx.core.content.FileProvider;

import com.nextcloud.android.sso.FilesAppTypeRegistry;
import com.nextcloud.android.sso.helper.VersionCheckHelper;
import com.nextcloud.android.sso.model.FilesAppType;
import com.sothree.slidinguppanel.SlidingUpPanelLayout;

import org.greenrobot.eventbus.EventBus;
Expand Down Expand Up @@ -77,7 +77,8 @@ protected void onCreate(@Nullable Bundle savedInstanceState) {
//if (mApi.getAPI() instanceof Proxy) { // doesn't work.. retrofit is also a "proxy"
boolean useSSO = mPrefs.getBoolean(SettingsActivity.SW_USE_SINGLE_SIGN_ON, false);
if(useSSO) {
VersionCheckHelper.verifyMinVersion(this, MIN_NEXTCLOUD_FILES_APP_VERSION_CODE, FilesAppType.PROD);
var type = FilesAppTypeRegistry.getInstance().findByAccountType("nextcloud"); // prod
VersionCheckHelper.verifyMinVersion(this, MIN_NEXTCLOUD_FILES_APP_VERSION_CODE, type);
}

mPostDelayHandler.stopRunningPostDelayHandler();
Expand Down