@@ -606,13 +606,23 @@ public SignInIntentBuilder setProviders(@NonNull String... providers) {
606
606
/**
607
607
* Enables or disables the use of Smart Lock for Passwords in the sign in flow.
608
608
* <p>
609
- * <p>SmartLock is enabled by default
609
+ * <p>SmartLock is enabled by default.
610
610
*/
611
611
public SignInIntentBuilder setIsSmartLockEnabled (boolean enabled ) {
612
612
mIsSmartLockEnabled = enabled ;
613
613
return this ;
614
614
}
615
615
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
+
616
626
private boolean isIdpAlreadyConfigured (@ NonNull String providerId ) {
617
627
for (IdpConfig config : mProviders ) {
618
628
if (config .getProviderId ().equals (providerId )) {
@@ -626,7 +636,7 @@ public Intent build() {
626
636
return KickoffActivity .createIntent (mApp .getApplicationContext (), getFlowParams ());
627
637
}
628
638
629
- @ VisibleForTesting (otherwise = VisibleForTesting . PRIVATE )
639
+ @ VisibleForTesting ()
630
640
public FlowParameters getFlowParams () {
631
641
return new FlowParameters (mApp .getName (),
632
642
new ArrayList <>(mProviders ),
@@ -636,12 +646,5 @@ public FlowParameters getFlowParams() {
636
646
mIsSmartLockEnabled ,
637
647
mAllowNewEmailAccounts );
638
648
}
639
-
640
- public SignInIntentBuilder setAllowNewEmailAccounts (boolean enabled ) {
641
- mAllowNewEmailAccounts = enabled ;
642
- return this ;
643
- }
644
-
645
-
646
649
}
647
650
}
0 commit comments