Skip to content

Commit 0e5bb59

Browse files
authored
Merge pull request #1172 from firebase/version-3.2.2-release
Version 3.2.2
2 parents 67d73b6 + f3db767 commit 0e5bb59

File tree

147 files changed

+6550
-6291
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

147 files changed

+6550
-6291
lines changed

.travis.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
language: android
22
jdk: oraclejdk8
3-
# See https://github.com/travis-ci/travis-ci/issues/5582
4-
sudo: required
3+
sudo: required # See https://github.com/travis-ci/travis-ci/issues/5582
4+
env:
5+
global:
6+
- secure: AeYETdNH/qdqvc3QScrZYJgV4Gupkj0LKeCpUP96I8DJBGmxZQeRWMI+mjtJzksTddnYnRQCU189UCJJJk8MH79cZQsvLAc9M8/f7nnX2s54NG2KZZV08t8xvlCS/XUmkwY6fCQsIoDAGA/+35pHp+pRU3j3gq/qxHtWWIJglt+Oew+fz5aHAO711EtnjuHwwFcc0WTPFDhOlo7goe0myAPG0I09g1yaW2odj1lQrej9bLOCvs6SJ6RRD/+4ZNLMw+r8Q662SGztOh//uCAZU67KD6FCst9AEgfECB6GPyN/UCr0rV/7HTU0rcjthr4QbNaCFPZ3hNCy13Wh7gPUM5quh481bgvx5YTtZCfKhAz0m53mkYseUlemlB7R54tOkcIezsByMhF8In2bOwVUD8JZmkhFb3bBDeao6g63defta0WIMlyYAWNxIdz//JDs40MCkOEj8s/VehvdOOnYUjwcXFsmSfqZP0Vf3Dpin51lxz1h+tSOMI5RmWEg5WICsIo/W7nvV85zgtd6/dWxunhDgKrhBpwrJsIrsOz2fDNIA9DB6BCAjYFK5rd/E4Ycww0Y8/Lxlqht39IJTSCApT17fNtFbF357z9fiKBeNXoaRIULPKXXPMMkHHPRai9RFYdCf8sCZ75aVkBJ4PsWexgBU+cTjHuw0saao68eS5s=
7+
- secure: bPFo+6ADLN/iAZmhHBYIexE0zuiXQT5M4RA20/t0QSh6EZ8DCtbrLy8jT3L3YU1rge1Qxv8J258GxN3N6UelI/dg96e15dHUX1+8dZCx/txxPBe/q4YamaKwwJForXje/5bqMz2YqdT1e50ScxKVXo/YRWF26hynNGsq916ATKjwM9GRUep7A6aa7EKrCvuXwELzUZqV/gfA8KMD+s03T+9vpgsxfGv6tnp5lpHeR5dDtI4wFcTPLkoRfhbuIoUTBBRaHbNJpHm8fBhTQTpGTG5pxC7QVkIbArdgIwptv3XeTn/7iPdv0zcMXnof4C8hJ3tguitR3q4ae5wS/QZGi8wxpL7L/tLkeswLpkjflbIBj4/U+nUS2DayVisu4zSTSKR1A6ARvlWFhSEYxhjp9i8z45uytCod22PeXg939OUK2IosNpwychWGCab7fVECOqlwruFIwi7Tu25bng6IWtD7zipFtMrBK2JY9ykLjJx5InXN3T2OJsq3V/g6dNRCF3isIUhxWMkYqK+bMTRbcQRA55Tb3kvZ9x1GEOVLUhwtzYdFWDtRN6MlJkhrEvznL9hawa6AKYVf38wws65/K/scjtNpbkFlW0py1EBD1VSAJSl7nThZJPRIH64Uv3FbYztNR3a6rk54L3WBc53svpNcesPU/M2I/BzwUsjfvIM=
58
before_cache:
69
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
710
- rm -fr $HOME/.gradle/caches/*/plugin-resolution/
@@ -21,6 +24,7 @@ android:
2124
- tools
2225
before_script: mv library/google-services.json app/google-services.json
2326
script: ./gradlew clean assembleDebug check
27+
after_success: ./scripts/artifactory.sh
2428
after_failure:
2529
# tests
2630
- cat app/build/reports/tests/testDebugUnitTest/index.html

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,16 +47,16 @@ libraries.
4747
```groovy
4848
dependencies {
4949
// FirebaseUI for Firebase Realtime Database
50-
implementation 'com.firebaseui:firebase-ui-database:3.2.1'
50+
implementation 'com.firebaseui:firebase-ui-database:3.2.2'
5151
5252
// FirebaseUI for Cloud Firestore
53-
implementation 'com.firebaseui:firebase-ui-firestore:3.2.1'
53+
implementation 'com.firebaseui:firebase-ui-firestore:3.2.2'
5454
5555
// FirebaseUI for Firebase Auth
56-
implementation 'com.firebaseui:firebase-ui-auth:3.2.1'
56+
implementation 'com.firebaseui:firebase-ui-auth:3.2.2'
5757
5858
// FirebaseUI for Cloud Storage
59-
implementation 'com.firebaseui:firebase-ui-storage:3.2.1'
59+
implementation 'com.firebaseui:firebase-ui-storage:3.2.2'
6060
}
6161
```
6262

@@ -103,7 +103,7 @@ For convenience, here are some recent examples:
103103

104104
| FirebaseUI Version | Firebase/Play Services Version |
105105
|--------------------|--------------------------------|
106-
| 3.2.1 | 11.8.0 |
106+
| 3.2.2 | 11.8.0 |
107107
| 3.1.3 | 11.8.0 |
108108
| 3.1.2 | 11.6.2 |
109109
| 3.1.0 | 11.4.2 |

app/build.gradle

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,19 +45,20 @@ dependencies {
4545
implementation project(path: ':database')
4646
implementation project(path: ':storage')
4747

48-
implementation 'com.facebook.android:facebook-login:4.29.0'
48+
implementation 'com.facebook.android:facebook-login:4.30.0'
4949
// Needed to override Facebook
5050
implementation "com.android.support:cardview-v7:$supportLibraryVersion"
5151
implementation "com.android.support:customtabs:$supportLibraryVersion"
5252
implementation("com.twitter.sdk.android:twitter-core:3.1.1@aar") { transitive = true }
5353

54-
implementation 'com.github.bumptech.glide:glide:4.4.0'
55-
annotationProcessor 'com.github.bumptech.glide:compiler:4.4.0'
54+
implementation 'com.github.bumptech.glide:glide:4.6.1'
55+
annotationProcessor 'com.github.bumptech.glide:compiler:4.6.1'
5656

5757
// The following dependencies are not required to use the Firebase UI library.
5858
// They are used to make some aspects of the demo app implementation simpler for
5959
// demonstrative purposes, and you may find them useful in your own apps; YMMV.
60-
implementation 'pub.devrel:easypermissions:1.1.1'
60+
implementation "android.arch.lifecycle:runtime:$architectureVersion"
61+
implementation 'pub.devrel:easypermissions:1.1.3'
6162
implementation 'com.jakewharton:butterknife:8.8.1'
6263
annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'
6364
debugImplementation 'com.squareup.leakcanary:leakcanary-android:1.5.4'

app/src/main/java/com/firebase/uidemo/auth/AuthUiActivity.java

Lines changed: 6 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@
1818
import android.content.Intent;
1919
import android.os.Bundle;
2020
import android.support.annotation.DrawableRes;
21-
import android.support.annotation.MainThread;
2221
import android.support.annotation.StringRes;
2322
import android.support.annotation.StyleRes;
2423
import android.support.design.widget.Snackbar;
2524
import android.support.v7.app.AppCompatActivity;
2625
import android.support.v7.app.AppCompatDelegate;
26+
import android.util.Log;
2727
import android.view.View;
2828
import android.widget.Button;
2929
import android.widget.CheckBox;
@@ -49,6 +49,8 @@
4949
import butterknife.OnClick;
5050

5151
public class AuthUiActivity extends AppCompatActivity {
52+
private static final String TAG = "AuthUiActivity";
53+
5254
private static final String GOOGLE_TOS_URL = "https://www.google.com/policies/terms/";
5355
private static final String FIREBASE_TOS_URL = "https://firebase.google.com/terms/";
5456
private static final String GOOGLE_PRIVACY_POLICY_URL = "https://www.google.com/policies/privacy/";
@@ -231,15 +233,13 @@ protected void onResume() {
231233
}
232234
}
233235

234-
@MainThread
235236
private void handleSignInResponse(int resultCode, Intent data) {
236237
IdpResponse response = IdpResponse.fromResultIntent(data);
237238

238239
// Successfully signed in
239240
if (resultCode == RESULT_OK) {
240241
startSignedInActivity(response);
241242
finish();
242-
return;
243243
} else {
244244
// Sign in failed
245245
if (response == null) {
@@ -248,18 +248,14 @@ private void handleSignInResponse(int resultCode, Intent data) {
248248
return;
249249
}
250250

251-
if (response.getErrorCode() == ErrorCodes.NO_NETWORK) {
251+
if (response.getError().getErrorCode() == ErrorCodes.NO_NETWORK) {
252252
showSnackbar(R.string.no_internet_connection);
253253
return;
254254
}
255255

256-
if (response.getErrorCode() == ErrorCodes.UNKNOWN_ERROR) {
257-
showSnackbar(R.string.unknown_error);
258-
return;
259-
}
256+
showSnackbar(R.string.unknown_error);
257+
Log.e(TAG, "Sign-in error: ", response.getError());
260258
}
261-
262-
showSnackbar(R.string.unknown_sign_in_response);
263259
}
264260

265261
private void startSignedInActivity(IdpResponse response) {
@@ -276,14 +272,12 @@ private void startSignedInActivity(IdpResponse response) {
276272
mEnableHintSelector.isChecked())));
277273
}
278274

279-
@MainThread
280275
private void setGoogleScopesEnabled(boolean enabled) {
281276
mGoogleScopesLabel.setEnabled(enabled);
282277
mGoogleScopeDriveFile.setEnabled(enabled);
283278
mGoogleScopeYoutubeData.setEnabled(enabled);
284279
}
285280

286-
@MainThread
287281
private void setFacebookScopesEnabled(boolean enabled) {
288282
mFacebookScopesLabel.setEnabled(enabled);
289283
mFacebookScopeFriends.setEnabled(enabled);
@@ -298,7 +292,6 @@ public void toggleDarkTheme() {
298292
getDelegate().setLocalNightMode(mode);
299293
}
300294

301-
@MainThread
302295
@StyleRes
303296
private int getSelectedTheme() {
304297
if (mUseGreenTheme.isChecked()) {
@@ -312,7 +305,6 @@ private int getSelectedTheme() {
312305
return AuthUI.getDefaultTheme();
313306
}
314307

315-
@MainThread
316308
@DrawableRes
317309
private int getSelectedLogo() {
318310
if (mFirebaseLogo.isChecked()) {
@@ -323,7 +315,6 @@ private int getSelectedLogo() {
323315
return AuthUI.NO_LOGO;
324316
}
325317

326-
@MainThread
327318
private List<IdpConfig> getSelectedProviders() {
328319
List<IdpConfig> selectedProviders = new ArrayList<>();
329320

@@ -356,7 +347,6 @@ private List<IdpConfig> getSelectedProviders() {
356347
return selectedProviders;
357348
}
358349

359-
@MainThread
360350
private String getSelectedTosUrl() {
361351
if (mUseGoogleTos.isChecked()) {
362352
return GOOGLE_TOS_URL;
@@ -365,7 +355,6 @@ private String getSelectedTosUrl() {
365355
return FIREBASE_TOS_URL;
366356
}
367357

368-
@MainThread
369358
private String getSelectedPrivacyPolicyUrl() {
370359
if (mUseGooglePrivacyPolicy.isChecked()) {
371360
return GOOGLE_PRIVACY_POLICY_URL;
@@ -374,17 +363,14 @@ private String getSelectedPrivacyPolicyUrl() {
374363
return FIREBASE_PRIVACY_POLICY_URL;
375364
}
376365

377-
@MainThread
378366
private boolean isGoogleMisconfigured() {
379367
return AuthUI.UNCONFIGURED_CONFIG_VALUE.equals(getString(R.string.default_web_client_id));
380368
}
381369

382-
@MainThread
383370
private boolean isFacebookMisconfigured() {
384371
return AuthUI.UNCONFIGURED_CONFIG_VALUE.equals(getString(R.string.facebook_application_id));
385372
}
386373

387-
@MainThread
388374
private boolean isTwitterMisconfigured() {
389375
List<String> twitterConfigs = Arrays.asList(
390376
getString(R.string.twitter_consumer_key),
@@ -394,12 +380,10 @@ private boolean isTwitterMisconfigured() {
394380
return twitterConfigs.contains(AuthUI.UNCONFIGURED_CONFIG_VALUE);
395381
}
396382

397-
@MainThread
398383
private void showSnackbar(@StringRes int errorMessageRes) {
399384
Snackbar.make(mRootView, errorMessageRes, Snackbar.LENGTH_LONG).show();
400385
}
401386

402-
@MainThread
403387
private List<String> getFacebookPermissions() {
404388
List<String> result = new ArrayList<>();
405389
if (mFacebookScopeFriends.isChecked()) {
@@ -411,7 +395,6 @@ private List<String> getFacebookPermissions() {
411395
return result;
412396
}
413397

414-
@MainThread
415398
private List<String> getGoogleScopes() {
416399
List<String> result = new ArrayList<>();
417400
if (mGoogleScopeYoutubeData.isChecked()) {

app/src/main/java/com/firebase/uidemo/auth/SignedInActivity.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@
2020
import android.os.Bundle;
2121
import android.os.Parcel;
2222
import android.os.Parcelable;
23-
import android.support.annotation.MainThread;
2423
import android.support.annotation.NonNull;
2524
import android.support.annotation.StringRes;
2625
import android.support.design.widget.Snackbar;
2726
import android.support.v7.app.AlertDialog;
2827
import android.support.v7.app.AppCompatActivity;
2928
import android.text.TextUtils;
29+
import android.util.Log;
3030
import android.view.View;
3131
import android.widget.ImageView;
3232
import android.widget.TextView;
@@ -56,6 +56,8 @@
5656

5757
public class SignedInActivity extends AppCompatActivity {
5858

59+
private static final String TAG = "SignedInActivity";
60+
5961
private static final String EXTRA_IDP_RESPONSE = "extra_idp_response";
6062
private static final String EXTRA_SIGNED_IN_CONFIG = "extra_signed_in_config";
6163

@@ -126,6 +128,7 @@ public void onComplete(@NonNull Task<Void> task) {
126128
startActivity(AuthUiActivity.createIntent(SignedInActivity.this));
127129
finish();
128130
} else {
131+
Log.w(TAG, "signOut:failure", task.getException());
129132
showSnackbar(R.string.sign_out_failed);
130133
}
131134
}
@@ -162,7 +165,6 @@ public void onComplete(@NonNull Task<Void> task) {
162165
});
163166
}
164167

165-
@MainThread
166168
private void populateProfile() {
167169
FirebaseUser user = FirebaseAuth.getInstance().getCurrentUser();
168170
if (user.getPhotoUrl() != null) {
@@ -241,7 +243,6 @@ private void populateIdpToken() {
241243
}
242244
}
243245

244-
@MainThread
245246
private void showSnackbar(@StringRes int errorMessageRes) {
246247
Snackbar.make(mRootView, errorMessageRes, Snackbar.LENGTH_LONG).show();
247248
}

app/src/main/res/values/strings.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@
6262
<string name="require_name">Require first/last name with email accounts.</string>
6363

6464
<string name="unknown_response">Unexpected onActivityResult response code</string>
65-
<string name="unknown_sign_in_response">Unknown response from AuthUI sign-in</string>
6665
<string name="sign_in_cancelled">Sign in cancelled</string>
6766
<string name="no_internet_connection">No internet connection</string>
6867
<string name="unknown_error">An unknown error occurred</string>

auth/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ Gradle, add the dependency:
6262
```groovy
6363
dependencies {
6464
// ...
65-
implementation 'com.firebaseui:firebase-ui-auth:3.2.1'
65+
implementation 'com.firebaseui:firebase-ui-auth:3.2.2'
6666
6767
// Required only if Facebook login support is required
6868
// Find the latest Facebook SDK releases here: https://goo.gl/Ce5L94

auth/auth-proguard.pro

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,18 @@
22
-dontwarn com.twitter.**
33
-dontwarn com.facebook.**
44

5+
# Don't note a bunch of dynamically referenced classes
6+
-dontnote com.google.**
7+
-dontnote com.facebook.**
8+
-dontnote com.twitter.**
9+
-dontnote com.squareup.okhttp.**
10+
-dontnote okhttp3.internal.**
11+
512
# Recommended flags for Firebase Auth
613
-keepattributes Signature
714
-keepattributes *Annotation*
815

9-
# Don't warn about retrofit or okio classes
10-
-dontwarn okio.**
11-
-dontwarn retrofit2.Call
16+
# Retrofit config
1217
-dontnote retrofit2.Platform
13-
-dontnote retrofit2.Platform$IOS$MainThreadExecutor
1418
-dontwarn retrofit2.Platform$Java8
19+
-keepattributes Exceptions

auth/build.gradle

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,25 +36,25 @@ android {
3636
dependencies {
3737
implementation "com.android.support:design:$supportLibraryVersion"
3838
implementation "com.android.support:customtabs:$supportLibraryVersion"
39-
implementation 'com.android.support.constraint:constraint-layout:1.1.0-beta3'
39+
implementation 'com.android.support.constraint:constraint-layout:1.1.0-beta5'
4040

4141
implementation "android.arch.lifecycle:extensions:$architectureVersion"
4242
annotationProcessor "android.arch.lifecycle:compiler:$architectureVersion"
4343

4444
api "com.google.firebase:firebase-auth:$firebaseVersion"
4545
api "com.google.android.gms:play-services-auth:$firebaseVersion"
4646

47-
compileOnly 'com.facebook.android:facebook-login:4.28.0'
47+
compileOnly 'com.facebook.android:facebook-login:4.30.0'
4848
// Needed to override Facebook
4949
implementation "com.android.support:cardview-v7:$supportLibraryVersion"
5050
implementation "com.android.support:customtabs:$supportLibraryVersion"
5151
compileOnly("com.twitter.sdk.android:twitter-core:3.1.1@aar") { transitive = true }
5252

5353
testImplementation 'junit:junit:4.12'
5454
//noinspection GradleDynamicVersion
55-
testImplementation 'org.mockito:mockito-core:2.13.+'
56-
testImplementation 'org.robolectric:robolectric:3.6.1'
57-
testImplementation 'com.facebook.android:facebook-login:4.29.0'
55+
testImplementation 'org.mockito:mockito-core:2.15.+'
56+
testImplementation 'org.robolectric:robolectric:3.7'
57+
testImplementation 'com.facebook.android:facebook-login:4.30.0'
5858
testImplementation("com.twitter.sdk.android:twitter-core:3.1.1@aar") { transitive = true }
5959

6060
debugImplementation project(':internal:lintchecks')

auth/src/main/AndroidManifest.xml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
<?xml version="1.0" encoding="utf-8"?>
12
<manifest
23
xmlns:android="http://schemas.android.com/apk/res/android"
34
xmlns:tools="http://schemas.android.com/tools"
@@ -11,6 +12,7 @@
1112
<meta-data
1213
android:name="com.google.android.gms.version"
1314
android:value="@integer/google_play_services_version" />
15+
1416
<meta-data
1517
android:name="com.facebook.sdk.ApplicationId"
1618
android:value="@string/facebook_application_id" />
@@ -60,6 +62,12 @@
6062
android:configChanges="keyboard|keyboardHidden|screenLayout|screenSize|orientation"
6163
tools:ignore="MissingRegistered" />
6264

65+
<activity
66+
android:name=".ui.credentials.CredentialSaveActivity"
67+
android:label=""
68+
android:exported="false"
69+
android:theme="@style/FirebaseUI.Transparent" />
70+
6371
<activity
6472
android:name="com.facebook.CustomTabActivity"
6573
android:exported="true"

0 commit comments

Comments
 (0)