-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Code inspect cleanup #785
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
Code inspect cleanup #785
Conversation
Oh, and I forgot to mention that it's built on top of #784. |
Signed-off-by: Alex Saveau <[email protected]>
Signed-off-by: Alex Saveau <[email protected]>
Signed-off-by: Alex Saveau <[email protected]>
Signed-off-by: Alex Saveau <[email protected]>
Signed-off-by: Alex Saveau <[email protected]>
Signed-off-by: Alex Saveau <[email protected]>
…nspect-cleanup # Conflicts: # auth/src/main/java/com/firebase/ui/auth/provider/FacebookProvider.java # auth/src/main/java/com/firebase/ui/auth/provider/TwitterProvider.java # auth/src/main/java/com/firebase/ui/auth/ui/phone/CountryListSpinner.java # auth/src/main/java/com/firebase/ui/auth/ui/phone/PhoneVerificationActivity.java
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 Merged! This diff is way smaller. 😄
@@ -156,7 +156,7 @@ public void onCreate(Bundle savedInstanceState) { | |||
return; | |||
} | |||
|
|||
if (!isGoogleConfigured()) { | |||
if (isGoogleMisconfigured()) { |
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.
Intellij said we were always inverting these.
import com.firebase.ui.auth.IdpResponse; | ||
|
||
public interface IdpProvider extends Provider { | ||
interface IdpCallback { | ||
void onSuccess(IdpResponse idpResponse); | ||
|
||
void onFailure(Bundle extra); | ||
void onFailure(); |
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.
We never use this bundle anywhere.
public interface Provider { | ||
/** Retrieves the name of the IDP, for display on-screen. */ | ||
String getName(Context context); | ||
|
||
/** Retrieves the id of the IDP, e.g. {@link GoogleAuthProvider#PROVIDER_ID}. */ | ||
String getProviderId(); |
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.
We never use this anywhere which makes sense since most of the time we need the provider id to figure out which class to instantiate. Thus, we would already have the provider id by the time we get an instance of a Provider
.
if (t != null) { | ||
mCountdownTimer.update(t); | ||
} | ||
mCountdownTimer.update(savedInstanceState.getLong(EXTRA_MILLIS_UNTIL_FINISHED)); |
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.
getLong
returns a long
, not a Long
so it's always going to be non-null.
LGTM! |
This PR does an Intellij code inspect and changes some semantics which is why I separated it from the style refactor PR.