Skip to content

Merge version-2.0.0-dev into master #748

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 126 commits into from
Jun 12, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
126 commits
Select commit Hold shift + click to select a range
62b42ea
Update constants.gradle
SUPERCILEX Feb 23, 2017
8493426
Merge pull request #608 from SUPERCILEX/patch-1
samtstern Feb 23, 2017
9d09ce8
Bug fixes and perf improvements for setting providers in AuthUI (#591)
SUPERCILEX Feb 24, 2017
4b06e19
Merge branch 'master' into version-2.0.0-dev
samtstern Feb 24, 2017
a885a34
Update dependencies
SUPERCILEX Mar 2, 2017
ab778be
Merge pull request #617 from SUPERCILEX/update
samtstern Mar 2, 2017
ac5c849
The Big Kahuna of firebase-ui-database (#544)
SUPERCILEX Mar 6, 2017
fa832d4
Support Facebook Login without email
puilp0502 Mar 6, 2017
cf144b4
Update documentation and sample for #544 (#567)
SUPERCILEX Mar 6, 2017
63df29c
Merge branch 'master' into version-2.0.0-dev
samtstern Mar 9, 2017
9ae131a
Add reauthentication (#583)
amandle Mar 13, 2017
c830479
finish the KickOffActivity on dialog tap outside
Mar 13, 2017
1c5e87b
Merge pull request #629 from amandle/finish_on_cancel
samtstern Mar 13, 2017
7c2f436
Redo changes from #591 (#630)
SUPERCILEX Mar 13, 2017
72ccc84
Support onChildChanged for index stuff
SUPERCILEX Mar 14, 2017
812ff23
Cleanup index array (#632)
SUPERCILEX Mar 14, 2017
fc1a4a4
Merge remote-tracking branch 'firebase/version-2.0.0-dev' into onData…
SUPERCILEX Mar 14, 2017
1b1cdb5
Merge pull request #624 from puilp0502/facebook-without-email
samtstern Mar 15, 2017
233d7c6
Make protected fields final in adapters
SUPERCILEX Mar 17, 2017
a91cfbe
Move play services to 10.2.1
samtstern Mar 21, 2017
85376f5
Log out of Twitter
SUPERCILEX Mar 22, 2017
6e388b3
Merge pull request #645 from SUPERCILEX/twitter-logout
samtstern Mar 22, 2017
cf3a6ea
Permanently fix NPEs when attempting to finish Smart Lock fragments (…
SUPERCILEX Mar 22, 2017
b96775f
Update version number to 2.0.0-SNAPSHOT
samtstern Mar 24, 2017
a626685
Fixed version conflict error (#652)
DroidPulkit Mar 27, 2017
8fdd60e
Update SignInDelegate.java
SUPERCILEX Apr 23, 2017
66c27ac
Improve email UX
SUPERCILEX Apr 23, 2017
85becb9
Merge pull request #669 from SUPERCILEX/patch-1
samtstern Apr 24, 2017
0e13d6d
Address review feedback
SUPERCILEX Apr 24, 2017
52cec90
Fix Intellij formatting
SUPERCILEX Apr 24, 2017
1730720
Merge pull request #670 from SUPERCILEX/email-ux
samtstern Apr 24, 2017
58fee9e
Merge remote-tracking branch 'upstream/version-2.0.0-dev' into onData…
SUPERCILEX Apr 24, 2017
af2c5af
Fix all possible null Log.x calls
SUPERCILEX Apr 25, 2017
de3c955
Merge pull request #674 from SUPERCILEX/null-log-fixes
samtstern Apr 25, 2017
4788873
Merge pull request #639 from SUPERCILEX/opened-fields
samtstern Apr 25, 2017
b3a7e5d
Add documentation and rename vars
SUPERCILEX Apr 25, 2017
d1a8247
Merge remote-tracking branch 'upstream/version-2.0.0-dev' into onData…
SUPERCILEX Apr 25, 2017
88328d4
More docs updates
SUPERCILEX Apr 26, 2017
1524f05
Merge pull request #633 from SUPERCILEX/onDataChanged
samtstern Apr 26, 2017
c54a3e9
Add solution to fetchProvidersForEmail failure
SUPERCILEX Apr 26, 2017
f43b87a
Merge branch 'master' into version-2.0.0-dev
samtstern Apr 26, 2017
406f4d3
Add compliance checking script
samtstern Apr 26, 2017
7bbf755
Merge pull request #677 from samtstern/compat-scripts
samtstern Apr 26, 2017
3d073ce
Merge pull request #675 from SUPERCILEX/email-fetch-failure
samtstern Apr 26, 2017
fc4d736
Add hint that a DatabaseReference is a Query
SUPERCILEX Apr 27, 2017
063e059
Fixup db readme
SUPERCILEX Apr 27, 2017
7e13e61
Update picture to display correct Chat model
SUPERCILEX Apr 27, 2017
1a1060b
Merge pull request #680 from SUPERCILEX/patch-1
samtstern Apr 28, 2017
bd1ad54
Fix displayed provider order being the inverse of the order in which …
SUPERCILEX Apr 28, 2017
bb2a262
Add explanatory comment
SUPERCILEX Apr 28, 2017
945ba1d
Merge pull request #679 from SUPERCILEX/ref-overloads
samtstern Apr 28, 2017
5de7b98
Oops, forgot to update README
SUPERCILEX Apr 28, 2017
33a8c03
Move deprecated providers methods together
SUPERCILEX Apr 28, 2017
1e59927
Fix indentation in README.md
SUPERCILEX Apr 28, 2017
49e2444
Refactor email provider to support custom order
SUPERCILEX Apr 28, 2017
f5412c3
Cleanup
SUPERCILEX Apr 28, 2017
2a615f6
Fix getContext NPE in saveCredentialsOrFinish
SUPERCILEX May 2, 2017
0b49163
Merge pull request #686 from SUPERCILEX/save-creds-npe
samtstern May 2, 2017
78149cb
Fix incorrect link in README to auth state changes (#687)
SUPERCILEX May 2, 2017
934a72c
Add some javadoc to Provider.java
SUPERCILEX May 2, 2017
8565d50
Refactor Provider to simplify inflating each idp button
SUPERCILEX May 2, 2017
393f900
Fix bug where starting the email flow would show a useless progress d…
SUPERCILEX May 2, 2017
f041fea
Merge pull request #681 from SUPERCILEX/provider-order
samtstern May 2, 2017
a9b4c5f
Phone Auth UI
ashwinraghav May 3, 2017
8fdf168
Merge branch 'version-2.0.0-dev' into phone-auth
samtstern May 3, 2017
2969232
Fixing (potential) NPE for phone accounts saved in smartlock
ashwinraghav May 3, 2017
3598ec6
Bug fixes
ashwinraghav May 8, 2017
cb6da8e
Fix NPE when saving smart lock
SUPERCILEX May 9, 2017
fb2bf1d
Merge pull request #694 from SUPERCILEX/save-creds-npe
samtstern May 9, 2017
e14973c
Description for auth strings to enable transations
ashwinraghav May 9, 2017
8a9a8e8
[CLEANUP] Refactor various classes (#678)
SUPERCILEX May 9, 2017
f2a78b2
Massively simplify styling (#696)
SUPERCILEX May 9, 2017
a6ec46f
Merge branch 'version-2.0.0-dev' into phone-auth
samtstern May 9, 2017
e26e858
Improve email UX when a user makes a typo in their email (#698)
SUPERCILEX May 11, 2017
f9fd1db
Merge branch 'version-2.0.0-dev' into phone-auth
samtstern May 11, 2017
5d114a6
Update deps (#703)
SUPERCILEX May 11, 2017
ee0a49a
Fix broken database tests (#705)
SUPERCILEX May 11, 2017
58c5f02
Update error strings to match spreadsheet.
May 11, 2017
3adb14a
Fix future lint errors (#704)
SUPERCILEX May 12, 2017
3e7d5f0
Make layouts better on small screens (#706)
samtstern May 12, 2017
4b0cdaa
Crash fix for app compat attribute lookup
ashwinraghav May 12, 2017
668da24
Merge "Crash fix for app compat attribute lookup" into phone-auth
ashwinraghav May 12, 2017
909aac5
Remove period from the end of sentences
May 12, 2017
2d6db67
Show keyboard in conf code screen
ashwinraghav May 12, 2017
6cfd80c
Do not show the hint picker before the Auth Method Picker screen
May 12, 2017
17bed21
Merge pull request #708 from amandle/no_hint_picker_before_nascar
samtstern May 13, 2017
09bf1d2
Set country selection to default locale
ashwinraghav May 13, 2017
c882020
Merge branch 'version-2.0.0-dev' into phone-auth
samtstern May 13, 2017
f8dc9a9
Improve README and fix #702
samtstern May 17, 2017
a6f8309
Merge pull request #714 from samtstern/docs-2.0
samtstern May 17, 2017
505415c
Wiring in activity scoped phone number auth api
ashwinraghav May 15, 2017
bc672c4
Converting phone number from hint selector to e164 optimistically
ashwinraghav May 16, 2017
6ad03e7
Introducing additional parameters for smart lock
ashwinraghav May 19, 2017
79eafd7
Fix phone number button vector drawable.
isaisachen May 24, 2017
2531fd2
Merge "Fix phone number button vector drawable." into phone-auth
isaisachen May 24, 2017
97f0e06
Phone auth terms of service
ashwinraghav May 23, 2017
f47f706
Merge "Phone auth terms of service" into phone-auth
ashwinraghav May 24, 2017
b882219
Request youtube data api permission instead of "games" scope
SUPERCILEX May 24, 2017
251d757
Merge pull request #725 from SUPERCILEX/example-scope
samtstern May 24, 2017
6f20458
Increasing auto retrieval timeout to 2 mins
ashwinraghav May 24, 2017
47ef4a0
Removing unnecessary translations
ashwinraghav May 25, 2017
01f876d
Merge "Remove period from the end of sentences" into phone-auth
ashwinraghav May 25, 2017
cad63e9
Translations refinement
ashwinraghav May 25, 2017
cf96d39
Update Facebook lib version (#728)
SUPERCILEX May 26, 2017
cea4ec1
Add support for privacy policy URLs in sign-up (#727)
WillieCubed May 31, 2017
46602c5
Merge branch 'version-2.0.0-dev' into phone-auth
samtstern May 31, 2017
b61c950
Tweaking twitter deps
ashwinraghav Jun 1, 2017
b2912b8
Revert reauthentication (#734)
samtstern Jun 1, 2017
f528a22
Add supported providers annotation (#700)
SUPERCILEX Jun 1, 2017
696aa44
Merge branch 'version-2.0.0-dev' into phone-auth
samtstern Jun 1, 2017
7e13be7
Provided scope for twitter and facebook sdk
ashwinraghav May 31, 2017
d340365
Merge "Merge branch 'version-2.0.0-dev' into phone-auth" into phone-auth
samtstern Jun 2, 2017
fbbd014
Fix case when only phone auth selected.
samtstern Jun 5, 2017
5ee62a3
Restrict unnecessary immutable stuff to library so we can change it l…
SUPERCILEX Jun 5, 2017
2435b77
Remove unnecessary immutable stuff (#738)
SUPERCILEX Jun 5, 2017
b9e3f8b
Remove all deprecated stuff (#609)
SUPERCILEX Jun 5, 2017
aa63079
Merge branch 'version-2.0.0-dev' into phone-auth
samtstern Jun 7, 2017
47c1a6c
Fix all lint and checkstyle violations
samtstern Jun 7, 2017
2217102
Fix more check failures
samtstern Jun 7, 2017
c8b5ed9
Fix test failures by working around Facebook SDK
samtstern Jun 8, 2017
f55c73b
Respond to SUPERCILEX review feedback
samtstern Jun 8, 2017
2b8a8ac
Fix `onDataChanged` not being called in FirebaseIndexArray if empty (…
SUPERCILEX Jun 8, 2017
6eba74c
Add call to onDataChanged when adding first listener (#736)
SUPERCILEX Jun 8, 2017
4137a21
Merge pull request #740 from firebase/phone-auth
samtstern Jun 8, 2017
9ede7ac
Upgrade guide and compat reports (#744)
samtstern Jun 9, 2017
f266b33
Merge branch 'master' into version-2.0.0-dev
samtstern Jun 9, 2017
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
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ cache:
android:
components:
- tools
- build-tools-25.0.2
- build-tools-25.0.3
- android-25
- platform-tools
- extra-android-m2repository
Expand Down
73 changes: 58 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,22 @@ A compatible FirebaseUI client is also available for [iOS](https://github.com/fi

## Table of Contents

1. [Installation](#installation)
1. [Usage](#usage)
1. [Installation](#installation)
1. [Upgrading](#upgrading)
1. [Dependencies](#dependencies)
1. [Sample App](#sample-app)
1. [Contributing](#contributing)

## Usage

FirebaseUI has separate modules for using Firebase Database, Auth, and Storage. To
get started, see the individual instructions for each module:

* [firebase-ui-database](database/README.md)
* [firebase-ui-auth](auth/README.md)
* [firebase-ui-storage](storage/README.md)

## Installation

FirebaseUI is published as a collection of libraries separated by the
Expand Down Expand Up @@ -47,6 +58,15 @@ required.

After the project is synchronized, we're ready to start using Firebase functionality in our app.

## Upgrading

If you are using an old version of FirebaseUI and upgrading, please see the appropriate
migration guide:

* [Upgrade from 1.2.0 to 2.0](./docs/upgrade-to-2.0.md)

## Dependencies

### Compatibility with Firebase / Google Play Services Libraries

FirebaseUI libraries have the following transitive dependencies on the Firebase SDK:
Expand All @@ -67,29 +87,52 @@ in `common/constants.gradle`. If you are using any dependencies in your app of
`compile 'com.google.firebase:firebase-*:x.y.z'` or `compile 'com.google.android.gms:play-services-*:x.y.z'`
you need to make sure that you use the same version that your chosen version of FirebaseUI requires.

For convenience, here are some examples:
For convenience, here are some recent examples:

| FirebaseUI Version | Firebase/Play Services Version |
|--------------------|--------------------------------|
| 1.2.0 | 10.2.0 |
| 1.1.1 | 10.0.0 or 10.0.1 |
| 1.0.1 | 10.0.0 or 10.0.1 |
| 1.0.0 | 9.8.0 |
| 0.6.2 | 9.8.0 |
| 0.6.1 | 9.6.1 |
| 0.6.0 | 9.6.0 |
| 0.5.3 | 9.4.0 |
| 0.4.4 | 9.4.0 |
| 0.4.3 | 9.2.1 |
| 0.4.2 | 9.2.0 |
| 0.4.1 | 9.0.2 |
| 0.4.0 | 9.0.0 |

## Usage

* [firebase-ui-database](database/README.md)
* [firebase-ui-auth](auth/README.md)
* [firebase-ui-storage](storage/README.md)
## Upgrading dependencies

If you would like to use a newer version of one of FirebaseUI's transitive dependencies, such
as Firebase, Play services, or the Android support libraries you need add explicit
`compile` declarations in your `build.gradle` for all of FirebaseUI's dependencies at the version
you want to use. For example if you want to use Play services/Firebase version `FOO` and support
libraries version `BAR` add the following extra lines for each FirebaseUI module you're using:

Auth:

```groovy
compile "com.google.firebase:firebase-auth:$FOO"
compile "com.google.android.gms:play-services-auth:$FOO"

compile "com.android.support:design:$BAR"
compile "com.android.support:customtabs:$BAR"
compile "com.android.support:cardview-v7:$BAR"
```

Database:

```groovy
compile "com.google.firebase:firebase-database:$FOO"

compile "com.android.support:recyclerview-v7:$BAR"
compile "com.android.support:support-v4:$BAR"
```

Storage:

```groovy
compile "com.google.firebase:firebase-storage:$FOO"

compile "com.android.support:appcompat-v7:$BAR"
compile "com.android.support:palette-v7:$BAR"
```

## Sample App

Expand Down
12 changes: 7 additions & 5 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
apply plugin: 'com.android.application'
apply plugin: 'com.neenbedankt.android-apt'
apply from: '../library/quality/quality.gradle'

android {
Expand Down Expand Up @@ -39,15 +38,18 @@ dependencies {
compile "com.google.firebase:firebase-database:$firebaseVersion"
compile "com.google.firebase:firebase-storage:$firebaseVersion"

compile('com.facebook.android:facebook-android-sdk:4.22.1')
compile("com.twitter.sdk.android:twitter-core:3.0.0@aar") { transitive = true }

// The following dependencies are not required to use the Firebase UI library.
// 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.3.0'
compile 'pub.devrel:easypermissions:0.4.0'
compile 'com.jakewharton:butterknife:8.5.1'
apt 'com.jakewharton:butterknife-compiler:8.5.1'
annotationProcessor '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'
releaseCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.5.1'
testCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.5.1'
}

apply plugin: 'com.google.gms.google-services'
3 changes: 3 additions & 0 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@
<activity
android:name=".database.ChatActivity"
android:label="@string/name_chat"/>
<activity
android:name=".database.ChatIndexActivity"
android:label="@string/name_chat"/>

<!-- Auth UI demo -->
<activity
Expand Down
92 changes: 68 additions & 24 deletions app/src/main/java/com/firebase/uidemo/auth/AuthUiActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ public class AuthUiActivity extends AppCompatActivity {
private static final String UNCHANGED_CONFIG_VALUE = "CHANGE-ME";
private static final String GOOGLE_TOS_URL = "https://www.google.com/policies/terms/";
private static final String FIREBASE_TOS_URL = "https://firebase.google.com/terms/";
private static final String GOOGLE_PRIVACY_POLICY_URL = "https://www.google.com/policies/privacy/";
private static final String FIREBASE_PRIVACY_POLICY_URL = "https://firebase.google.com/terms/analytics/#7_privacy";
private static final int RC_SIGN_IN = 100;

@BindView(R.id.default_theme)
Expand All @@ -69,6 +71,9 @@ public class AuthUiActivity extends AppCompatActivity {
@BindView(R.id.email_provider)
CheckBox mUseEmailProvider;

@BindView(R.id.phone_provider)
CheckBox mUsePhoneProvider;

@BindView(R.id.google_provider)
CheckBox mUseGoogleProvider;

Expand All @@ -84,6 +89,12 @@ public class AuthUiActivity extends AppCompatActivity {
@BindView(R.id.firebase_tos)
RadioButton mUseFirebaseTos;

@BindView(R.id.google_privacy)
RadioButton mUseGooglePrivacyPolicy;

@BindView(R.id.firebase_privacy)
RadioButton mUseFirebasePrivacyPolicy;

@BindView(R.id.sign_in)
Button mSignIn;

Expand All @@ -99,8 +110,11 @@ public class AuthUiActivity extends AppCompatActivity {
@BindView(R.id.no_logo)
RadioButton mNoLogo;

@BindView(R.id.smartlock_enabled)
CheckBox mEnableSmartLock;
@BindView(R.id.credential_selector_enabled)
CheckBox mEnableCredentialSelector;

@BindView(R.id.hint_selector_enabled)
CheckBox mEnableHintSelector;

@BindView(R.id.allow_new_email_accounts)
CheckBox mAllowNewEmailAccounts;
Expand All @@ -120,22 +134,22 @@ public class AuthUiActivity extends AppCompatActivity {
@BindView(R.id.google_scope_drive_file)
CheckBox mGoogleScopeDriveFile;

@BindView(R.id.google_scope_games)
CheckBox mGoogleScopeGames;
@BindView(R.id.google_scope_youtube_data)
CheckBox mGoogleScopeYoutubeData;

@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.auth_ui_layout);
ButterKnife.bind(this);

FirebaseAuth auth = FirebaseAuth.getInstance();
if (auth.getCurrentUser() != null) {
startActivity(SignedInActivity.createIntent(this, null));
startSignedInActivity(null);
finish();
return;
}

setContentView(R.layout.auth_ui_layout);
ButterKnife.bind(this);

if (!isGoogleConfigured()) {
mUseGoogleProvider.setChecked(false);
mUseGoogleProvider.setEnabled(false);
Expand Down Expand Up @@ -183,9 +197,11 @@ public void signIn(View view) {
AuthUI.getInstance().createSignInIntentBuilder()
.setTheme(getSelectedTheme())
.setLogo(getSelectedLogo())
.setProviders(getSelectedProviders())
.setAvailableProviders(getSelectedProviders())
.setTosUrl(getSelectedTosUrl())
.setIsSmartLockEnabled(mEnableSmartLock.isChecked())
.setPrivacyPolicyUrl(getSelectedPrivacyPolicyUrl())
.setIsSmartLockEnabled(mEnableCredentialSelector.isChecked(),
mEnableHintSelector.isChecked())
.setAllowNewEmailAccounts(mAllowNewEmailAccounts.isChecked())
.build(),
RC_SIGN_IN);
Expand All @@ -208,7 +224,7 @@ private void handleSignInResponse(int resultCode, Intent data) {

// Successfully signed in
if (resultCode == ResultCodes.OK) {
startActivity(SignedInActivity.createIntent(this, response));
startSignedInActivity(response);
finish();
return;
} else {
Expand All @@ -233,11 +249,25 @@ private void handleSignInResponse(int resultCode, Intent data) {
showSnackbar(R.string.unknown_sign_in_response);
}

private void startSignedInActivity(IdpResponse response) {
startActivity(
SignedInActivity.createIntent(
this,
response,
new SignedInActivity.SignedInConfig(
getSelectedLogo(),
getSelectedTheme(),
getSelectedProviders(),
getSelectedTosUrl(),
mEnableCredentialSelector.isChecked(),
mEnableHintSelector.isChecked())));
}

@MainThread
private void setGoogleScopesEnabled(boolean enabled) {
mGoogleScopesLabel.setEnabled(enabled);
mGoogleScopeDriveFile.setEnabled(enabled);
mGoogleScopeGames.setEnabled(enabled);
mGoogleScopeYoutubeData.setEnabled(enabled);
}

@MainThread
Expand Down Expand Up @@ -280,12 +310,11 @@ private int getSelectedLogo() {
private List<IdpConfig> getSelectedProviders() {
List<IdpConfig> selectedProviders = new ArrayList<>();

if (mUseEmailProvider.isChecked()) {
selectedProviders.add(new IdpConfig.Builder(AuthUI.EMAIL_PROVIDER).build());
}

if (mUseTwitterProvider.isChecked()) {
selectedProviders.add(new IdpConfig.Builder(AuthUI.TWITTER_PROVIDER).build());
if (mUseGoogleProvider.isChecked()) {
selectedProviders.add(
new IdpConfig.Builder(AuthUI.GOOGLE_PROVIDER)
.setPermissions(getGooglePermissions())
.build());
}

if (mUseFacebookProvider.isChecked()) {
Expand All @@ -295,11 +324,17 @@ private List<IdpConfig> getSelectedProviders() {
.build());
}

if (mUseGoogleProvider.isChecked()) {
if (mUseTwitterProvider.isChecked()) {
selectedProviders.add(new IdpConfig.Builder(AuthUI.TWITTER_PROVIDER).build());
}

if (mUseEmailProvider.isChecked()) {
selectedProviders.add(new IdpConfig.Builder(AuthUI.EMAIL_PROVIDER).build());
}

if (mUsePhoneProvider.isChecked()) {
selectedProviders.add(
new IdpConfig.Builder(AuthUI.GOOGLE_PROVIDER)
.setPermissions(getGooglePermissions())
.build());
new IdpConfig.Builder(AuthUI.PHONE_VERIFICATION_PROVIDER).build());
}

return selectedProviders;
Expand All @@ -314,6 +349,15 @@ private String getSelectedTosUrl() {
return FIREBASE_TOS_URL;
}

@MainThread
private String getSelectedPrivacyPolicyUrl() {
if (mUseGooglePrivacyPolicy.isChecked()) {
return GOOGLE_PRIVACY_POLICY_URL;
}

return FIREBASE_PRIVACY_POLICY_URL;
}

@MainThread
private boolean isGoogleConfigured() {
return !UNCHANGED_CONFIG_VALUE.equals(
Expand Down Expand Up @@ -356,8 +400,8 @@ private List<String> getFacebookPermissions() {
@MainThread
private List<String> getGooglePermissions() {
List<String> result = new ArrayList<>();
if (mGoogleScopeGames.isChecked()) {
result.add(Scopes.GAMES);
if (mGoogleScopeYoutubeData.isChecked()) {
result.add("https://www.googleapis.com/auth/youtube.readonly");
}
if (mGoogleScopeDriveFile.isChecked()) {
result.add(Scopes.DRIVE_FILE);
Expand Down
Loading