Skip to content

Add documentation for setAllowNewEmailAccounts and teeny cleanup #551

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

Merged
merged 4 commits into from
Jan 27, 2017
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 app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ dependencies {
// They are used to make some aspects of the demo app implementation simpler for
// demonstrative purposes, and you may find them useful in your own apps; YMMV.
compile 'pub.devrel:easypermissions:0.2.1'
compile 'com.jakewharton:butterknife:8.4.0'
apt 'com.jakewharton:butterknife-compiler:8.4.0'
compile 'com.jakewharton:butterknife:8.5.1'
apt 'com.jakewharton:butterknife-compiler:8.5.1'
debugCompile 'com.squareup.leakcanary:leakcanary-android:1.5'
releaseCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.5'
testCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.5'
Expand Down
21 changes: 12 additions & 9 deletions auth/src/main/java/com/firebase/ui/auth/AuthUI.java
Original file line number Diff line number Diff line change
Expand Up @@ -606,13 +606,23 @@ public SignInIntentBuilder setProviders(@NonNull String... providers) {
/**
* Enables or disables the use of Smart Lock for Passwords in the sign in flow.
* <p>
* <p>SmartLock is enabled by default
* <p>SmartLock is enabled by default.
*/
public SignInIntentBuilder setIsSmartLockEnabled(boolean enabled) {
mIsSmartLockEnabled = enabled;
return this;
}

/**
* Enables or disables creating new accounts in the email sign in flow.
* <p>
* <p>Account creation is enabled by default.
*/
public SignInIntentBuilder setAllowNewEmailAccounts(boolean enabled) {
mAllowNewEmailAccounts = enabled;
return this;
}

private boolean isIdpAlreadyConfigured(@NonNull String providerId) {
for (IdpConfig config : mProviders) {
if (config.getProviderId().equals(providerId)) {
Expand All @@ -626,7 +636,7 @@ public Intent build() {
return KickoffActivity.createIntent(mApp.getApplicationContext(), getFlowParams());
}

@VisibleForTesting(otherwise = VisibleForTesting.PRIVATE)
@VisibleForTesting()
public FlowParameters getFlowParams() {
return new FlowParameters(mApp.getName(),
new ArrayList<>(mProviders),
Expand All @@ -636,12 +646,5 @@ public FlowParameters getFlowParams() {
mIsSmartLockEnabled,
mAllowNewEmailAccounts);
}

public SignInIntentBuilder setAllowNewEmailAccounts(boolean enabled) {
mAllowNewEmailAccounts = enabled;
return this;
}


}
}