Skip to content

Commit ea0da75

Browse files
committed
Add context overload
Change-Id: Ieb1c289837cedc63e0b8c79c8034ac88301df4b1
1 parent 6a1731f commit ea0da75

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
import android.support.annotation.NonNull;
2222
import android.support.annotation.Nullable;
2323
import android.support.annotation.StyleRes;
24+
import android.support.annotation.VisibleForTesting;
2425

2526
import com.facebook.FacebookSdk;
2627
import com.facebook.login.LoginManager;
@@ -416,6 +417,11 @@ public SignInIntentBuilder setIsSmartLockEnabled(boolean enabled) {
416417

417418
public Intent build() {
418419
Context context = mApp.getApplicationContext();
420+
return build(context);
421+
}
422+
423+
@VisibleForTesting
424+
public Intent build(Context context) {
419425
List<IDPProviderParcel> providerInfo =
420426
ProviderHelper.getProviderParcels(context, mProviders);
421427
return ChooseAccountActivity.createIntent(

auth/src/test/java/com/firebase/ui/auth/ui/ChooseAccountActivityTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ private Intent createStartIntent() {
7373
.createSignInIntentBuilder()
7474
.setProviders(AuthUI.EMAIL_PROVIDER, AuthUI.GOOGLE_PROVIDER)
7575
.setIsSmartLockEnabled(true)
76-
.build();
76+
.build(RuntimeEnvironment.application);
7777
}
7878

7979
@Test

0 commit comments

Comments
 (0)