Skip to content

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

Merged
merged 11 commits into from
Jul 5, 2017
Merged

Code inspect cleanup #785

merged 11 commits into from
Jul 5, 2017

Conversation

SUPERCILEX
Copy link
Collaborator

This PR does an Intellij code inspect and changes some semantics which is why I separated it from the style refactor PR.

@SUPERCILEX
Copy link
Collaborator Author

Oh, and I forgot to mention that it's built on top of #784.

@SUPERCILEX SUPERCILEX mentioned this pull request Jul 2, 2017
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
Copy link
Collaborator Author

@SUPERCILEX SUPERCILEX left a 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()) {
Copy link
Collaborator Author

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();
Copy link
Collaborator Author

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();
Copy link
Collaborator Author

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));
Copy link
Collaborator Author

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.

@samtstern
Copy link
Contributor

LGTM!

@samtstern samtstern merged commit 6aeafd4 into firebase:version-2.1.0-dev Jul 5, 2017
@SUPERCILEX SUPERCILEX deleted the code-inspect-cleanup branch July 5, 2017 21:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants