From 227bb7ce4cfe8307206e271ee19d479d3b301239 Mon Sep 17 00:00:00 2001 From: tobiasKaminsky Date: Tue, 12 Jun 2018 14:25:07 +0200 Subject: [PATCH] use jitpack instead of submodules hide password field if SSO is used: todo currently set to dummy value multidex now needed --- .gitmodules | 3 --- News-Android-App/build.gradle | 5 ++++- .../de/luhmer/owncloudnewsreader/LoginDialogFragment.java | 8 ++++++-- settings.gradle | 2 +- 4 files changed, 11 insertions(+), 7 deletions(-) diff --git a/.gitmodules b/.gitmodules index 90a4d22c..c7b285cb 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,6 +1,3 @@ -[submodule "ownCloud-Account-Importer"] - path = ownCloud-Account-Importer - url = https://github.com/David-Development/ownCloud-Account-Importer.git [submodule "MaterialShowcaseView"] path = MaterialShowcaseView url = https://github.com/David-Development/MaterialShowcaseView.git diff --git a/News-Android-App/build.gradle b/News-Android-App/build.gradle index 511aece8..abb4a14f 100644 --- a/News-Android-App/build.gradle +++ b/News-Android-App/build.gradle @@ -13,6 +13,7 @@ android { buildToolsVersion project.ANDROID_BUILD_TOOLS_VERSION defaultConfig { + multiDexEnabled true minSdkVersion Integer.parseInt(project.ANDROID_BUILD_MIN_SDK_VERSION) targetSdkVersion Integer.parseInt(project.ANDROID_BUILD_TARGET_SDK_VERSION) @@ -89,6 +90,7 @@ repositories { jcenter() maven { url 'http://guardian.github.com/maven/repo-releases' } //needed for com.gu:option:1.3 in Android-DirectoryChooser maven { url "http://dl.bintray.com/lukaville/maven" } //Needed for com.nbsp:library:1.02 in Material File Picker + maven { url "https://jitpack.io" } } @@ -100,7 +102,7 @@ dependencies { // You must install or update the Google Repository through the SDK manager to use this dependency. // The Google Repository (separate from the corresponding library) can be found in the Extras category. // implementation 'com.google.android.gms:play-services:4.2.42' - api project(path: ':ownCloud-Account-Importer') + implementation "com.github.nextcloud:android-SingleSignOn:sso-SNAPSHOT" implementation "com.android.support:support-v4:${SUPPORT_VERSION}" implementation "com.android.support:support-compat:${SUPPORT_VERSION}" implementation "com.android.support:appcompat-v7:${SUPPORT_VERSION}" @@ -113,6 +115,7 @@ dependencies { implementation 'com.nostra13.universalimageloader:universal-image-loader:1.9.4' implementation 'com.google.code.gson:gson:2.8.0' implementation 'com.jakewharton:butterknife:8.8.1' + implementation 'com.android.support:multidex:1.0.3' annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1' compileOnly 'com.google.auto.value:auto-value:1.5.2' diff --git a/News-Android-App/src/main/java/de/luhmer/owncloudnewsreader/LoginDialogFragment.java b/News-Android-App/src/main/java/de/luhmer/owncloudnewsreader/LoginDialogFragment.java index c5c56221..f00177bf 100644 --- a/News-Android-App/src/main/java/de/luhmer/owncloudnewsreader/LoginDialogFragment.java +++ b/News-Android-App/src/main/java/de/luhmer/owncloudnewsreader/LoginDialogFragment.java @@ -33,6 +33,7 @@ import android.content.SharedPreferences; import android.content.SharedPreferences.Editor; import android.os.Bundle; import android.preference.PreferenceManager; +import android.support.design.widget.TextInputLayout; import android.support.v4.app.ActivityCompat; import android.support.v4.app.DialogFragment; import android.support.v7.app.AlertDialog; @@ -117,6 +118,8 @@ public class LoginDialogFragment extends DialogFragment implements IAccountImpor // UI references. @BindView(R.id.username) EditText mUsernameView; @BindView(R.id.password) EditText mPasswordView; + @BindView(R.id.password_container) + TextInputLayout mPasswordContainerView; @BindView(R.id.edt_owncloudRootPath) EditText mOc_root_path_View; @BindView(R.id.cb_AllowAllSSLCertificates) CheckBox mCbDisableHostnameVerificationView; @BindView(R.id.imgView_ShowPassword) ImageView mImageViewShowPwd; @@ -131,9 +134,10 @@ public class LoginDialogFragment extends DialogFragment implements IAccountImpor try { SingleSignOnAccount singleAccount = AccountImporter.BlockingGetAuthToken(getActivity(), account); mUsernameView.setText(singleAccount.username); - mPasswordView.setText(singleAccount.password); + mPasswordContainerView.setVisibility(View.GONE); + mPasswordView.setText("Dummy"); mOc_root_path_View.setText(singleAccount.url); - mCbDisableHostnameVerificationView.setChecked(singleAccount.disableHostnameVerification); + mCbDisableHostnameVerificationView.setVisibility(View.GONE); this.importedAccount = account; } catch (Exception e) { e.printStackTrace(); diff --git a/settings.gradle b/settings.gradle index 15dfa2d7..c988f0f3 100644 --- a/settings.gradle +++ b/settings.gradle @@ -1,4 +1,4 @@ -include ':News-Android-App', ':ownCloud-Account-Importer' +include ':News-Android-App' include ':Changeloglib:ChangeLogLibrary' include ':MaterialShowcaseView:library'