Skip to content

Commit

Permalink
update SSO Lib from 1.1.0 -> 1.3.2
Browse files Browse the repository at this point in the history
Signed-off-by: David Luhmer <[email protected]>
  • Loading branch information
David-Development committed Oct 16, 2024
1 parent b081581 commit d889423
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
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

0 comments on commit d889423

Please sign in to comment.