Skip to content

Commit 922466b

Browse files
authored
Update major dependencies (#1853)
1 parent 7e6071a commit 922466b

File tree

42 files changed

+131
-115
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+131
-115
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
- Update all dependencies to latest major version.

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

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
import android.content.Context;
1818
import android.content.Intent;
19+
import android.os.Build;
1920
import android.os.Bundle;
2021
import android.util.Log;
2122
import android.view.View;
@@ -348,8 +349,10 @@ private void startSignedInActivity(@Nullable IdpResponse response) {
348349
public void toggleDarkTheme() {
349350
int mode = mDarkTheme.isChecked() ?
350351
AppCompatDelegate.MODE_NIGHT_YES : AppCompatDelegate.MODE_NIGHT_AUTO_BATTERY;
351-
AppCompatDelegate.setDefaultNightMode(mode);
352-
getDelegate().setLocalNightMode(mode);
352+
if (Build.VERSION.SDK_INT >= 17) {
353+
AppCompatDelegate.setDefaultNightMode(mode);
354+
getDelegate().setLocalNightMode(mode);
355+
}
353356
}
354357

355358
@StyleRes

app/src/main/java/com/firebase/uidemo/util/ConfigurationUtils.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
import com.google.firebase.auth.ActionCodeSettings;
99

1010
import java.util.ArrayList;
11-
import java.util.Arrays;
1211
import java.util.List;
1312

1413
import androidx.annotation.NonNull;

app/src/main/res/layout/activity_anonymous_upgrade.xml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<LinearLayout
3-
xmlns:android="http://schemas.android.com/apk/res/android"
2+
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
43
xmlns:tools="http://schemas.android.com/tools"
4+
xmlns:app="http://schemas.android.com/apk/res-auto"
55
android:id="@+id/root"
66
android:layout_width="match_parent"
77
android:layout_height="match_parent"
@@ -12,13 +12,13 @@
1212
android:orientation="vertical"
1313
tools:context=".auth.AuthUiActivity">
1414

15-
<TextView
15+
<androidx.appcompat.widget.AppCompatTextView
1616
style="@style/Base.TextAppearance.AppCompat.Headline"
1717
android:layout_width="wrap_content"
1818
android:layout_height="wrap_content"
1919
android:layout_gravity="center_horizontal"
20-
android:drawableTop="@drawable/firebase_auth_120dp"
21-
android:text="@string/title_anonymous_upgrade" />
20+
android:text="@string/title_anonymous_upgrade"
21+
app:drawableTopCompat="@drawable/firebase_auth_120dp" />
2222

2323
<TextView
2424
android:id="@+id/status_text"

app/src/main/res/layout/auth_ui_layout.xml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
33
xmlns:tools="http://schemas.android.com/tools"
4+
xmlns:app="http://schemas.android.com/apk/res-auto"
45
android:id="@+id/root"
56
android:layout_width="match_parent"
67
android:layout_height="match_parent"
@@ -20,13 +21,13 @@
2021
android:orientation="vertical"
2122
android:paddingBottom="32dp">
2223

23-
<TextView
24+
<androidx.appcompat.widget.AppCompatTextView
2425
style="@style/Base.TextAppearance.AppCompat.Headline"
2526
android:layout_width="wrap_content"
2627
android:layout_height="wrap_content"
2728
android:layout_gravity="center_horizontal"
28-
android:drawableTop="@drawable/firebase_auth_120dp"
29-
android:text="@string/launch_title" />
29+
android:text="@string/launch_title"
30+
app:drawableTopCompat="@drawable/firebase_auth_120dp"/>
3031

3132
<Button
3233
android:id="@+id/sign_in"

app/src/main/res/layout/signed_in_layout.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@
1818
android:layout_marginBottom="16dp"
1919
android:orientation="vertical">
2020

21-
<TextView
21+
<androidx.appcompat.widget.AppCompatTextView
2222
style="@style/Base.TextAppearance.AppCompat.Headline"
2323
android:layout_width="wrap_content"
2424
android:layout_height="wrap_content"
2525
android:layout_gravity="center_horizontal"
26-
android:drawableTop="@drawable/firebase_auth_120dp"
27-
android:text="@string/signed_in_header" />
26+
android:text="@string/signed_in_header"
27+
app:drawableTopCompat="@drawable/firebase_auth_120dp" />
2828

2929
<LinearLayout
3030
android:layout_width="wrap_content"

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
import androidx.annotation.NonNull;
1919
import androidx.annotation.Nullable;
2020
import androidx.annotation.RestrictTo;
21-
import androidx.lifecycle.ViewModelProviders;
21+
import androidx.lifecycle.ViewModelProvider;
2222

2323
@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
2424
public class KickoffActivity extends InvisibleActivityBase {
@@ -31,7 +31,7 @@ public static Intent createIntent(Context context, FlowParameters flowParams) {
3131
@Override
3232
protected void onCreate(@Nullable final Bundle savedInstanceState) {
3333
super.onCreate(savedInstanceState);
34-
mKickstarter = ViewModelProviders.of(this).get(SignInKickstarter.class);
34+
mKickstarter = new ViewModelProvider(this).get(SignInKickstarter.class);
3535
mKickstarter.init(getFlowParams());
3636
mKickstarter.getOperation().observe(this, new ResourceObserver<IdpResponse>(this) {
3737
@Override

auth/src/main/java/com/firebase/ui/auth/data/remote/GenericIdpSignInHandler.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@
4141

4242
import java.util.HashMap;
4343
import java.util.List;
44-
import java.util.Map;
4544

4645
@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
4746
public class GenericIdpSignInHandler extends ProviderSignInBase<AuthUI.IdpConfig> {

auth/src/main/java/com/firebase/ui/auth/data/remote/SignInKickstarter.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,10 @@
3636
import com.google.android.gms.tasks.Task;
3737
import com.google.firebase.auth.AuthResult;
3838
import com.google.firebase.auth.EmailAuthProvider;
39-
import com.google.firebase.auth.FacebookAuthProvider;
4039
import com.google.firebase.auth.FirebaseAuthInvalidCredentialsException;
4140
import com.google.firebase.auth.FirebaseAuthInvalidUserException;
42-
import com.google.firebase.auth.GithubAuthProvider;
4341
import com.google.firebase.auth.GoogleAuthProvider;
4442
import com.google.firebase.auth.PhoneAuthProvider;
45-
import com.google.firebase.auth.TwitterAuthProvider;
4643

4744
import java.util.ArrayList;
4845
import java.util.List;

auth/src/main/java/com/firebase/ui/auth/ui/credentials/CredentialSaveActivity.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
import androidx.annotation.NonNull;
1818
import androidx.annotation.Nullable;
19-
import androidx.lifecycle.ViewModelProviders;
19+
import androidx.lifecycle.ViewModelProvider;
2020

2121
/**
2222
* Invisible Activity used for saving credentials to SmartLock.
@@ -43,7 +43,7 @@ protected void onCreate(@Nullable Bundle savedInstanceState) {
4343
final IdpResponse response = getIntent().getParcelableExtra(ExtraConstants.IDP_RESPONSE);
4444
Credential credential = getIntent().getParcelableExtra(ExtraConstants.CREDENTIAL);
4545

46-
mHandler = ViewModelProviders.of(this).get(SmartLockHandler.class);
46+
mHandler = new ViewModelProvider(this).get(SmartLockHandler.class);
4747
mHandler.init(getFlowParams());
4848
mHandler.setResponse(response);
4949

0 commit comments

Comments
 (0)