Skip to content

Commit 4b6550c

Browse files
committed
Merge branch 'firebase-master' into update-database-access-modifiers
2 parents fa82073 + 9124771 commit 4b6550c

File tree

8 files changed

+42
-30
lines changed

8 files changed

+42
-30
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
.gradle
2-
gradle.properties
32
/local.properties
43
.idea
54
.DS_Store

auth/src/main/java/com/firebase/ui/auth/ui/account_link/SaveCredentialsActivity.java

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -79,26 +79,10 @@ protected void onCreate(Bundle savedInstanceState) {
7979
.addConnectionCallbacks(this)
8080
.addOnConnectionFailedListener(this)
8181
.addApi(Auth.CREDENTIALS_API)
82+
.enableAutoManage(this, this)
8283
.build();
83-
mCredentialsApiClient.connect();
8484
}
8585

86-
87-
@Override
88-
protected void onStart() {
89-
super.onStart();
90-
mCredentialsApiClient.connect();
91-
}
92-
93-
@Override
94-
protected void onStop() {
95-
super.onStop();
96-
if (mCredentialsApiClient != null) {
97-
mCredentialsApiClient.disconnect();
98-
}
99-
}
100-
101-
10286
@Override
10387
public void onConnected(@Nullable Bundle bundle) {
10488
if (mEmail == null) {

auth/src/main/java/com/firebase/ui/auth/ui/email/SignInActivity.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@ public void onFailure(@NonNull Exception e) {
126126
TextInputLayout passwordInput =
127127
(TextInputLayout) findViewById(R.id.password_layout);
128128
passwordInput.setError(getString(R.string.login_error));
129+
mActivityHelper.dismissDialog();
129130
}
130131
});
131132
}

auth/src/main/java/com/firebase/ui/auth/util/FirebaseAuthWrapper.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
import android.support.annotation.Nullable;
2222
import android.support.annotation.WorkerThread;
2323

24+
import android.support.v4.app.FragmentActivity;
2425
import com.google.firebase.auth.AuthCredential;
2526
import com.google.firebase.auth.FirebaseUser;
2627

@@ -68,7 +69,7 @@ FirebaseUser linkWithCredential(
6869

6970
boolean isPlayServicesAvailable(Context context);
7071

71-
PendingIntent getEmailHintIntent(Context context);
72+
PendingIntent getEmailHintIntent(FragmentActivity context);
7273

7374
void setTimeOut(long timeoutMs);
7475

auth/src/main/java/com/firebase/ui/auth/util/FirebaseAuthWrapperImpl.java

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,14 @@
1414

1515
package com.firebase.ui.auth.util;
1616

17+
import android.app.Fragment;
1718
import android.app.PendingIntent;
1819
import android.content.Context;
1920
import android.os.Bundle;
2021
import android.support.annotation.NonNull;
2122
import android.support.annotation.Nullable;
2223
import android.support.annotation.WorkerThread;
24+
import android.support.v4.app.FragmentActivity;
2325
import android.util.Log;
2426

2527
import com.firebase.ui.auth.BuildConfig;
@@ -29,6 +31,7 @@
2931
import com.google.android.gms.common.ConnectionResult;
3032
import com.google.android.gms.common.GoogleApiAvailability;
3133
import com.google.android.gms.common.api.GoogleApiClient;
34+
import com.google.android.gms.common.api.GoogleApiClient.OnConnectionFailedListener;
3235
import com.google.android.gms.tasks.Task;
3336
import com.google.android.gms.tasks.Tasks;
3437
import com.google.firebase.auth.AuthCredential;
@@ -153,18 +156,23 @@ protected boolean isPlayServicesAvailable(
153156
}
154157

155158
@Override
156-
public PendingIntent getEmailHintIntent(Context context) {
157-
if (!isPlayServicesAvailable(context, GoogleApiAvailability.getInstance())) {
159+
public PendingIntent getEmailHintIntent(FragmentActivity fragmentActivity) {
160+
if (!isPlayServicesAvailable(fragmentActivity, GoogleApiAvailability.getInstance())) {
158161
return null;
159162
}
160163

161-
GoogleApiClient client = new GoogleApiClient.Builder(context)
164+
GoogleApiClient client = new GoogleApiClient.Builder(fragmentActivity)
162165
.addConnectionCallbacks(this)
163166
.addApi(Auth.CREDENTIALS_API)
167+
.enableAutoManage(fragmentActivity, new OnConnectionFailedListener() {
168+
@Override
169+
public void onConnectionFailed(@NonNull ConnectionResult connectionResult) {
170+
Log.e(TAG,
171+
"Client connection failed: " + connectionResult.getErrorMessage());
172+
}
173+
})
164174
.build();
165175

166-
client.connect();
167-
168176
HintRequest hintRequest = new HintRequest.Builder()
169177
.setHintPickerConfig(new CredentialPickerConfig.Builder()
170178
.setShowCancelButton(true)

gradle.properties

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Project-wide Gradle settings.
2+
3+
# IDE (e.g. Android Studio) users:
4+
# Gradle settings configured through the IDE *will override*
5+
# any settings specified in this file.
6+
7+
# For more details on how to configure your build environment visit
8+
# http://www.gradle.org/docs/current/userguide/build_environment.html
9+
10+
# Specifies the JVM arguments used for the daemon process.
11+
# The setting is particularly useful for tweaking memory settings.
12+
# Default value: -Xmx10248m -XX:MaxPermSize=256m
13+
# org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
14+
org.gradle.jvmargs=-Xmx1536m
15+
16+
# When configured, Gradle will run in incubating parallel mode.
17+
# This option should only be used with decoupled projects. More details, visit
18+
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
19+
# org.gradle.parallel=true
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
#Tue Aug 02 23:08:04 SGT 2016
1+
#Tue Sep 27 18:02:33 SGT 2016
22
distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-3.1-all.zip

storage/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22

33
## Using FirebaseUI to download and display images
44

5-
[Firebase Storage](firebase-storage) provides secure file uploads and downloads for your Firebase apps,
5+
[Firebase Storage][firebase-storage] provides secure file uploads and downloads for your Firebase apps,
66
regardless of network quality. You can use it to store images, audio, video, or other
77
user-generated content. Firebase Storage is backed by Google Cloud Storage, a powerful, simple,
88
and cost-effective object storage service.
99

1010
FirebaseUI provides bindings to download an image file stored in Firebase Storage
11-
from a [`StorageReference`](storage-reference) and display it using the popular
12-
[Glide](glide) library. This technique allows you to get all of Glide's performance
11+
from a [`StorageReference`][storage-reference] and display it using the popular
12+
[Glide][glide] library. This technique allows you to get all of Glide's performance
1313
benefits while leveraging Firebase Storage's authenticated storage capabilities.
1414

1515
To load an image from a `StorageReference`, simply use the `FirebaseImageLoader` class:
@@ -30,7 +30,7 @@ To load an image from a `StorageReference`, simply use the `FirebaseImageLoader`
3030

3131
Images displayed using `FirebaseImageLoader` are cached by their path in Firebase Storage, so
3232
repeated loads will be fast and conserve bandwidth. For more information on caching in Glide,
33-
see [this guide](glide-caching)
33+
see [this guide][glide-caching].
3434

3535
## Known Issues
3636

0 commit comments

Comments
 (0)