Skip to content

Commit f4494c4

Browse files
authored
Merge pull request #872 from firebase/version-2.3.0-release
Version 2.3.0
2 parents 49ca5e1 + 9d4efee commit f4494c4

File tree

99 files changed

+667
-383
lines changed

Some content is hidden

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

99 files changed

+667
-383
lines changed

README.md

Lines changed: 5 additions & 4 deletions

app/build.gradle

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ android {
1111
targetSdkVersion targetSdk
1212
versionCode 1
1313
versionName "1.0"
14+
15+
vectorDrawables.useSupportLibrary = true
1416
}
1517

1618
buildTypes {
@@ -42,15 +44,15 @@ dependencies {
4244
compile "com.google.firebase:firebase-database:$firebaseVersion"
4345
compile "com.google.firebase:firebase-storage:$firebaseVersion"
4446

45-
compile('com.facebook.android:facebook-android-sdk:4.23.0')
47+
compile('com.facebook.android:facebook-android-sdk:4.25.0')
4648
compile("com.twitter.sdk.android:twitter-core:3.0.0@aar") { transitive = true }
4749

4850
// The following dependencies are not required to use the Firebase UI library.
4951
// They are used to make some aspects of the demo app implementation simpler for
5052
// demonstrative purposes, and you may find them useful in your own apps; YMMV.
51-
compile 'pub.devrel:easypermissions:0.4.2'
52-
compile 'com.jakewharton:butterknife:8.5.1'
53-
annotationProcessor 'com.jakewharton:butterknife-compiler:8.5.1'
53+
compile 'pub.devrel:easypermissions:0.4.3'
54+
compile 'com.jakewharton:butterknife:8.7.0'
55+
annotationProcessor 'com.jakewharton:butterknife-compiler:8.7.0'
5456
debugCompile 'com.squareup.leakcanary:leakcanary-android:1.5'
5557
releaseCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.5.1'
5658
testCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.5.1'

app/src/main/AndroidManifest.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
android:allowBackup="true"
1414
android:fullBackupContent="true"
1515
android:icon="@mipmap/ic_launcher"
16+
android:roundIcon="@mipmap/ic_launcher_round"
1617
android:supportsRtl="true"
1718
android:theme="@style/AppTheme"
1819
tools:ignore="GoogleAppIndexingWarning">

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

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@
3535
import com.firebase.ui.auth.AuthUI.IdpConfig;
3636
import com.firebase.ui.auth.ErrorCodes;
3737
import com.firebase.ui.auth.IdpResponse;
38-
import com.firebase.ui.auth.ResultCodes;
3938
import com.firebase.uidemo.R;
4039
import com.google.android.gms.common.Scopes;
4140
import com.google.firebase.auth.FirebaseAuth;
@@ -54,6 +53,7 @@ public class AuthUiActivity extends AppCompatActivity {
5453
private static final String FIREBASE_TOS_URL = "https://firebase.google.com/terms/";
5554
private static final String GOOGLE_PRIVACY_POLICY_URL = "https://www.google.com/policies/privacy/";
5655
private static final String FIREBASE_PRIVACY_POLICY_URL = "https://firebase.google.com/terms/analytics/#7_privacy";
56+
5757
private static final int RC_SIGN_IN = 100;
5858

5959
@BindView(R.id.default_theme)
@@ -138,9 +138,7 @@ public class AuthUiActivity extends AppCompatActivity {
138138
CheckBox mGoogleScopeYoutubeData;
139139

140140
public static Intent createIntent(Context context) {
141-
Intent in = new Intent();
142-
in.setClass(context, AuthUiActivity.class);
143-
return in;
141+
return new Intent(context, AuthUiActivity.class);
144142
}
145143

146144
@Override
@@ -229,7 +227,7 @@ private void handleSignInResponse(int resultCode, Intent data) {
229227
IdpResponse response = IdpResponse.fromResultIntent(data);
230228

231229
// Successfully signed in
232-
if (resultCode == ResultCodes.OK) {
230+
if (resultCode == RESULT_OK) {
233231
startSignedInActivity(response);
234232
finish();
235233
return;
@@ -307,7 +305,7 @@ private int getSelectedLogo() {
307305
if (mFirebaseLogo.isChecked()) {
308306
return R.drawable.firebase_auth_120dp;
309307
} else if (mGoogleLogo.isChecked()) {
310-
return R.drawable.logo_googleg_color_144dp;
308+
return R.drawable.ic_googleg_color_144dp;
311309
}
312310
return AuthUI.NO_LOGO;
313311
}

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

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -133,8 +133,7 @@ public void onComplete(@NonNull Task<Void> task) {
133133

134134
@OnClick(R.id.delete_account)
135135
public void deleteAccountClicked() {
136-
137-
AlertDialog dialog = new AlertDialog.Builder(this)
136+
new AlertDialog.Builder(this)
138137
.setMessage("Are you sure you want to delete this account?")
139138
.setPositiveButton("Yes, nuke it!", new DialogInterface.OnClickListener() {
140139
@Override
@@ -143,9 +142,7 @@ public void onClick(DialogInterface dialogInterface, int i) {
143142
}
144143
})
145144
.setNegativeButton("No", null)
146-
.create();
147-
148-
dialog.show();
145+
.show();
149146
}
150147

151148
private void deleteAccount() {
-894 Bytes
Binary file not shown.
Binary file not shown.
-568 Bytes
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<layer-list
2+
xmlns:android="http://schemas.android.com/apk/res/android"
3+
xmlns:aapt="http://schemas.android.com/aapt"
4+
xmlns:tools="http://schemas.android.com/tools">
5+
<item>
6+
<shape android:shape="oval">
7+
<solid android:color="@color/material_gray_300" />
8+
<size
9+
android:width="48dp"
10+
android:height="48dp" />
11+
</shape>
12+
</item>
13+
<item
14+
android:bottom="4dp"
15+
android:left="4dp"
16+
android:right="4dp"
17+
android:top="4dp">
18+
<aapt:attr name="android:drawable">
19+
<vector
20+
android:width="44dp"
21+
android:height="44dp"
22+
android:viewportHeight="24.0"
23+
android:viewportWidth="24.0"
24+
tools:targetApi="lollipop">
25+
<path
26+
android:fillColor="@color/material_gray_500"
27+
android:pathData="M12,12c2.21,0 4,-1.79 4,-4s-1.79,-4 -4,-4 -4,1.79 -4,4 1.79,4 4,4zM12,14c-2.67,0 -8,1.34 -8,4v2h16v-2c0,-2.66 -5.33,-4 -8,-4z" />
28+
</vector>
29+
</aapt:attr>
30+
</item>
31+
</layer-list>
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<vector
2+
xmlns:android="http://schemas.android.com/apk/res/android"
3+
android:width="144dp"
4+
android:height="144dp"
5+
android:viewportHeight="512.0"
6+
android:viewportWidth="512.0">
7+
<path
8+
android:fillColor="#4285f4"
9+
android:pathData="M482.6,261.4c0,-16.7 -1.5,-32.8 -4.3,-48.3H256v91.3h127c-5.5,29.5 -22.1,54.5 -47.1,71.2v59.2h76.3c44.6,-41.1 70.4,-101.6 70.4,-173.5z" />
10+
<path
11+
android:fillColor="#34a853"
12+
android:pathData="M256,492c63.7,0 117.1,-21.1 156.2,-57.2l-76.3,-59.2c-21.1,14.2 -48.2,22.5 -79.9,22.5 -61.5,0 -113.5,-41.5 -132.1,-97.3H45.1v61.2c38.8,77.1 118.6,130 210.9,130z" />
13+
<path
14+
android:fillColor="#fbbc05"
15+
android:pathData="M123.9,300.8c-4.7,-14.2 -7.4,-29.3 -7.4,-44.8s2.7,-30.7 7.4,-44.8V150H45.1C29.1,181.9 20,217.9 20,256c0,38.1 9.1,74.1 25.1,106l78.8,-61.2z" />
16+
<path
17+
android:fillColor="#ea4335"
18+
android:pathData="M256,113.9c34.7,0 65.8,11.9 90.2,35.3l67.7,-67.7C373,43.4 319.6,20 256,20c-92.3,0 -172.1,52.9 -210.9,130l78.8,61.2c18.6,-55.8 70.6,-97.3 132.1,-97.3z" />
19+
</vector>

app/src/main/res/layout/message.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
android:layout_height="50dp"
1515
android:layout_marginStart="2dp"
1616
android:layout_marginLeft="2dp"
17-
android:background="@drawable/chat_message_arrow"
17+
android:background="@drawable/ic_chat_message_arrow"
1818
android:rotation="180" />
1919

2020

@@ -24,7 +24,7 @@
2424
android:layout_height="wrap_content"
2525
android:layout_marginLeft="26dp"
2626
android:layout_marginRight="26dp"
27-
android:background="@drawable/chat_message_background"
27+
android:background="@drawable/ic_chat_message_background"
2828
android:orientation="vertical"
2929
android:padding="10dp">
3030

@@ -56,7 +56,7 @@
5656
android:layout_alignRight="@+id/message"
5757
android:layout_marginRight="25dp"
5858
android:layout_alignParentTop="true"
59-
android:background="@drawable/chat_message_arrow"
59+
android:background="@drawable/ic_chat_message_arrow"
6060
android:rotation="180" />
6161

6262
</RelativeLayout>

app/src/main/res/layout/signed_in_layout.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<ScrollView
33
xmlns:android="http://schemas.android.com/apk/res/android"
4+
xmlns:app="http://schemas.android.com/apk/res-auto"
45
xmlns:tools="http://schemas.android.com/tools"
56
android:layout_width="match_parent"
67
android:layout_height="match_parent"
@@ -71,7 +72,7 @@
7172
android:layout_gravity="center_horizontal"
7273
android:layout_margin="16dp"
7374
android:contentDescription="@string/profile_picture_content_desc"
74-
android:src="@drawable/anon_user_48dp" />
75+
app:srcCompat="@drawable/ic_anon_user_48dp" />
7576

7677
<LinearLayout
7778
android:layout_width="wrap_content"
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
3+
<background android:drawable="@android:color/white"/>
4+
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
5+
</adaptive-icon>
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
3+
<background android:drawable="@android:color/white"/>
4+
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
5+
</adaptive-icon>
-1.4 KB
-1.22 KB
-2.8 KB
-2.68 KB
-5.42 KB

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
<color name="material_green_300">#AED581</color>
2020

2121
<color name="material_gray_300">#E0E0E0</color>
22+
<color name="material_gray_500">#9e9e9e</color>
2223
<color name="material_gray_850">#ff303030</color>
2324
<color name="material_gray_900">#ff212121</color>
2425

auth/README.md

Lines changed: 6 additions & 6 deletions

auth/auth-proguard.pro

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,14 @@
1+
# Twitter and Facebook are optional
12
-dontwarn com.twitter.**
2-
-dontwarn com.facebook.**
3+
-dontwarn com.facebook.**
4+
5+
# Recommended flags for Firebase Auth
6+
-keepattributes Signature
7+
-keepattributes *Annotation*
8+
9+
# Don't warn about retrofit or okio classes
10+
-dontwarn okio.**
11+
-dontwarn retrofit2.Call
12+
-dontnote retrofit2.Platform
13+
-dontnote retrofit2.Platform$IOS$MainThreadExecutor
14+
-dontwarn retrofit2.Platform$Java8

auth/build.gradle

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ android {
1111
versionCode 1
1212
versionName "1.0"
1313

14+
vectorDrawables.useSupportLibrary = true
1415
resourcePrefix "fui_"
1516
}
1617

@@ -19,7 +20,7 @@ android {
1920
manifestPlaceholders = [enableFbLogging: true]
2021

2122
minifyEnabled false
22-
consumerProguardFiles getDefaultProguardFile('proguard-android.txt'), 'auth-proguard.pro'
23+
consumerProguardFiles 'auth-proguard.pro'
2324
}
2425

2526
debug {
@@ -50,7 +51,7 @@ dependencies {
5051
compile "com.google.firebase:firebase-auth:$firebaseVersion"
5152
compile "com.google.android.gms:play-services-auth:$firebaseVersion"
5253

53-
provided 'com.facebook.android:facebook-android-sdk:4.23.0'
54+
provided 'com.facebook.android:facebook-android-sdk:4.25.0'
5455
provided("com.twitter.sdk.android:twitter-core:3.0.0@aar") { transitive = true }
5556

5657
// The following libraries are needed to prevent incompatibilities with the facebook
@@ -61,7 +62,7 @@ dependencies {
6162
//noinspection GradleDynamicVersion
6263
testCompile 'org.mockito:mockito-core:2.8.+'
6364
testCompile 'org.robolectric:robolectric:3.4'
64-
testCompile 'com.facebook.android:facebook-android-sdk:4.23.0'
65+
testCompile 'com.facebook.android:facebook-android-sdk:4.25.0'
6566
}
6667

6768
javadoc.exclude([

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@
4747
import com.google.firebase.auth.PhoneAuthProvider;
4848
import com.google.firebase.auth.TwitterAuthProvider;
4949

50+
import java.lang.annotation.Retention;
51+
import java.lang.annotation.RetentionPolicy;
5052
import java.util.ArrayList;
5153
import java.util.Arrays;
5254
import java.util.Collections;
@@ -73,6 +75,7 @@ public class AuthUI {
7375
FacebookAuthProvider.PROVIDER_ID, FACEBOOK_PROVIDER,
7476
TwitterAuthProvider.PROVIDER_ID, TWITTER_PROVIDER
7577
})
78+
@Retention(RetentionPolicy.SOURCE)
7679
public @interface SupportedProvider {}
7780

7881
/**

0 commit comments

Comments
 (0)