Skip to content

Commit 25cdfaa

Browse files
SUPERCILEXsamtstern
authored andcommitted
Add documentation for setAllowNewEmailAccounts and teeny cleanup (#551)
1 parent 6affdfe commit 25cdfaa

File tree

2 files changed

+14
-11
lines changed

2 files changed

+14
-11
lines changed

app/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ dependencies {
4343
// They are used to make some aspects of the demo app implementation simpler for
4444
// demonstrative purposes, and you may find them useful in your own apps; YMMV.
4545
compile 'pub.devrel:easypermissions:0.2.1'
46-
compile 'com.jakewharton:butterknife:8.4.0'
47-
apt 'com.jakewharton:butterknife-compiler:8.4.0'
46+
compile 'com.jakewharton:butterknife:8.5.1'
47+
apt 'com.jakewharton:butterknife-compiler:8.5.1'
4848
debugCompile 'com.squareup.leakcanary:leakcanary-android:1.5'
4949
releaseCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.5'
5050
testCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.5'

auth/src/main/java/com/firebase/ui/auth/AuthUI.java

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -606,13 +606,23 @@ public SignInIntentBuilder setProviders(@NonNull String... providers) {
606606
/**
607607
* Enables or disables the use of Smart Lock for Passwords in the sign in flow.
608608
* <p>
609-
* <p>SmartLock is enabled by default
609+
* <p>SmartLock is enabled by default.
610610
*/
611611
public SignInIntentBuilder setIsSmartLockEnabled(boolean enabled) {
612612
mIsSmartLockEnabled = enabled;
613613
return this;
614614
}
615615

616+
/**
617+
* Enables or disables creating new accounts in the email sign in flow.
618+
* <p>
619+
* <p>Account creation is enabled by default.
620+
*/
621+
public SignInIntentBuilder setAllowNewEmailAccounts(boolean enabled) {
622+
mAllowNewEmailAccounts = enabled;
623+
return this;
624+
}
625+
616626
private boolean isIdpAlreadyConfigured(@NonNull String providerId) {
617627
for (IdpConfig config : mProviders) {
618628
if (config.getProviderId().equals(providerId)) {
@@ -626,7 +636,7 @@ public Intent build() {
626636
return KickoffActivity.createIntent(mApp.getApplicationContext(), getFlowParams());
627637
}
628638

629-
@VisibleForTesting(otherwise = VisibleForTesting.PRIVATE)
639+
@VisibleForTesting()
630640
public FlowParameters getFlowParams() {
631641
return new FlowParameters(mApp.getName(),
632642
new ArrayList<>(mProviders),
@@ -636,12 +646,5 @@ public FlowParameters getFlowParams() {
636646
mIsSmartLockEnabled,
637647
mAllowNewEmailAccounts);
638648
}
639-
640-
public SignInIntentBuilder setAllowNewEmailAccounts(boolean enabled) {
641-
mAllowNewEmailAccounts = enabled;
642-
return this;
643-
}
644-
645-
646649
}
647650
}

0 commit comments

Comments
 (0)