-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Update everything, remove deprecated stuff from updates, make Travis builds less flaky, and update storage sample #559
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
Changes from all commits
7ccf482
8a3f6a3
4f5c675
1d9c937
2d0ff11
647b0db
8993048
f501d20
cc4b64b
a38ebd0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package com.firebase.uidemo.util; | ||
|
||
import android.content.Context; | ||
import android.support.annotation.NonNull; | ||
import android.widget.Toast; | ||
|
||
import com.firebase.uidemo.R; | ||
import com.google.android.gms.tasks.OnCompleteListener; | ||
import com.google.android.gms.tasks.Task; | ||
import com.google.firebase.auth.AuthResult; | ||
|
||
/** | ||
* Notifies the user of sign in successes or failures beyond the lifecycle of an activity. | ||
*/ | ||
public class SignInResultNotifier implements OnCompleteListener<AuthResult> { | ||
private Context mContext; | ||
|
||
public SignInResultNotifier(Context context) { | ||
mContext = context.getApplicationContext(); | ||
} | ||
|
||
@Override | ||
public void onComplete(@NonNull Task<AuthResult> task) { | ||
if (task.isSuccessful()) { | ||
Toast.makeText(mContext, R.string.signed_in, Toast.LENGTH_SHORT).show(); | ||
} else { | ||
Toast.makeText(mContext, R.string.anonymous_auth_failed_msg, Toast.LENGTH_LONG).show(); | ||
} | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,7 +24,6 @@ | |
import android.support.annotation.StyleRes; | ||
import android.support.annotation.VisibleForTesting; | ||
|
||
import com.facebook.FacebookSdk; | ||
import com.facebook.login.LoginManager; | ||
import com.firebase.ui.auth.ui.FlowParameters; | ||
import com.firebase.ui.auth.ui.idp.AuthMethodPickerActivity; | ||
|
@@ -347,9 +346,7 @@ public Void then(@NonNull Task<GoogleApiClient> task) throws Exception { | |
}); | ||
|
||
// Facebook sign out | ||
if (FacebookSdk.isInitialized()) { | ||
LoginManager.getInstance().logOut(); | ||
} | ||
LoginManager.getInstance().logOut(); | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Did something change the Facebook SDK that we no longer need to deal with initialization? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @samtstern Since you noticed, I might as well explain it now instead of in my review. The easiest would be to read Facebook's release notes: https://developers.facebook.com/docs/android/change-log-4x#4_19_0 and the upgrade guide https://developers.facebook.com/docs/android/upgrading-4x#4180to4190. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. SGTM |
||
// Wait for all tasks to complete | ||
return Tasks.whenAll(disableCredentialsTask, googleSignOutTask); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@SUPERCILEX Could we be inadvertently disabling something in developer's apps? What if they have a conflicting value in their
AndroidManifest
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@samtstern cc4b64b is the best solution I can come up with. Since we are upgrading the Facebook sdk for people, they will expect the Facebook upgrade guide (remove the
initializeApp
) to work. With this latest commit, that will still work, but people will have to override our manifest if they want to disable it: