Skip to content

Commit 3085cf3

Browse files
committed
Fix for broken auth javadoc
Bug: 28762927 Change-Id: I99b9e17bcabee700dd427a9bad895b10d004f745
1 parent 902b3d7 commit 3085cf3

File tree

3 files changed

+13
-7
lines changed

3 files changed

+13
-7
lines changed

app/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ android {
2626
dependencies {
2727
compile fileTree(dir: 'libs', include: ['*.jar'])
2828
compile 'com.android.support:appcompat-v7:23.2.1'
29+
compile 'com.android.support:design:23.2.1'
2930
compile 'com.android.support:recyclerview-v7:23.2.1'
3031
compile 'com.android.support:support-v4:23.2.1'
3132

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ private void handleSignInResponse(int resultCode, Intent data) {
132132
@StyleRes
133133
private int getSelectedTheme() {
134134
if (mUseDefaultTheme.isChecked()) {
135-
return AuthUI.DEFAULT_THEME;
135+
return AuthUI.getDefaultTheme();
136136
}
137137

138138
if (mUsePurpleTheme.isChecked()) {

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

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,12 @@
2222
import android.support.annotation.Nullable;
2323
import android.support.annotation.StyleRes;
2424

25-
import com.firebase.ui.auth.ui.FlowParameters;
26-
import com.firebase.ui.auth.util.CredentialsApiHelper;
2725
import com.firebase.ui.auth.provider.FacebookProvider;
2826
import com.firebase.ui.auth.provider.GoogleProvider;
2927
import com.firebase.ui.auth.provider.IDPProviderParcel;
28+
import com.firebase.ui.auth.ui.FlowParameters;
3029
import com.firebase.ui.auth.ui.credentials.ChooseAccountActivity;
30+
import com.firebase.ui.auth.util.CredentialsApiHelper;
3131
import com.google.android.gms.common.api.Status;
3232
import com.google.android.gms.tasks.Continuation;
3333
import com.google.android.gms.tasks.Task;
@@ -94,10 +94,14 @@ public class AuthUI {
9494
)));
9595

9696
/**
97-
* The theme identifier to use in {@link SignInIntentBuilder#setTheme(int)} if no theme
97+
* Default theme to be used in {@link SignInIntentBuilder#setTheme(int)} if no theme
9898
* customization is required.
9999
*/
100-
public static final int DEFAULT_THEME = R.style.FirebaseUI;
100+
public static @StyleRes int getDefaultTheme() {
101+
// TODO(iainmgin): figure out why this works as a static method but not as a static
102+
// final variable.
103+
return R.style.FirebaseUI;
104+
}
101105

102106
/**
103107
* Signs the current user out, if one is signed in. The
@@ -151,7 +155,8 @@ public Void then(@NonNull Task<Status> task) throws Exception {
151155
public static final class SignInIntentBuilder {
152156
private Context mContext;
153157
private FirebaseApp mFirebaseApp;
154-
private int mTheme = DEFAULT_THEME;
158+
159+
private int mTheme = getDefaultTheme();
155160
private List<String> mProviders = Collections.singletonList(EMAIL_PROVIDER);
156161
private String mTosUrl;
157162

@@ -189,7 +194,7 @@ public SignInIntentBuilder setFirebaseApp(@Nullable FirebaseApp firebaseApp) {
189194

190195
/**
191196
* Specifies the theme to use for the application flow. If no theme is specified,
192-
* {@link #DEFAULT_THEME} will be used.
197+
* a default theme will be used.
193198
*/
194199
public SignInIntentBuilder setTheme(@StyleRes int theme) {
195200
mTheme = theme;

0 commit comments

Comments
 (0)