diff options
author | Alex Ning <chineseperson5@gmail.com> | 2019-02-21 09:24:23 +0000 |
---|---|---|
committer | Alex Ning <chineseperson5@gmail.com> | 2019-02-21 09:24:23 +0000 |
commit | 82d97cf73208f3f187b965fca4460f68af33f6b7 (patch) | |
tree | 76da6482a83ebc3d09b6a8f0353d057f200ddfde /app/src/main/java | |
parent | 2b0228ab476426531f0f064e80e3cf2019081569 (diff) | |
download | infinity-for-reddit-82d97cf73208f3f187b965fca4460f68af33f6b7.tar infinity-for-reddit-82d97cf73208f3f187b965fca4460f68af33f6b7.tar.gz infinity-for-reddit-82d97cf73208f3f187b965fca4460f68af33f6b7.tar.bz2 infinity-for-reddit-82d97cf73208f3f187b965fca4460f68af33f6b7.tar.lz infinity-for-reddit-82d97cf73208f3f187b965fca4460f68af33f6b7.tar.xz infinity-for-reddit-82d97cf73208f3f187b965fca4460f68af33f6b7.tar.zst infinity-for-reddit-82d97cf73208f3f187b965fca4460f68af33f6b7.zip |
Migrate to AndroidX
Diffstat (limited to 'app/src/main/java')
49 files changed, 178 insertions, 183 deletions
diff --git a/app/src/main/java/SubredditDatabase/SubredditDao.java b/app/src/main/java/SubredditDatabase/SubredditDao.java index 657da989..b99b8baf 100644 --- a/app/src/main/java/SubredditDatabase/SubredditDao.java +++ b/app/src/main/java/SubredditDatabase/SubredditDao.java @@ -1,10 +1,10 @@ package SubredditDatabase; -import android.arch.lifecycle.LiveData; -import android.arch.persistence.room.Dao; -import android.arch.persistence.room.Insert; -import android.arch.persistence.room.OnConflictStrategy; -import android.arch.persistence.room.Query; +import androidx.lifecycle.LiveData; +import androidx.room.Dao; +import androidx.room.Insert; +import androidx.room.OnConflictStrategy; +import androidx.room.Query; @Dao public interface SubredditDao { diff --git a/app/src/main/java/SubredditDatabase/SubredditData.java b/app/src/main/java/SubredditDatabase/SubredditData.java index 973eda18..9af7204d 100644 --- a/app/src/main/java/SubredditDatabase/SubredditData.java +++ b/app/src/main/java/SubredditDatabase/SubredditData.java @@ -1,8 +1,8 @@ package SubredditDatabase; -import android.arch.persistence.room.ColumnInfo; -import android.arch.persistence.room.Entity; -import android.support.annotation.NonNull; +import androidx.room.ColumnInfo; +import androidx.room.Entity; +import androidx.annotation.NonNull; import SubscribedSubredditDatabase.SubscribedSubredditData; diff --git a/app/src/main/java/SubredditDatabase/SubredditRepository.java b/app/src/main/java/SubredditDatabase/SubredditRepository.java index 4e435da9..5e4cb7d7 100644 --- a/app/src/main/java/SubredditDatabase/SubredditRepository.java +++ b/app/src/main/java/SubredditDatabase/SubredditRepository.java @@ -1,7 +1,7 @@ package SubredditDatabase; import android.app.Application; -import android.arch.lifecycle.LiveData; +import androidx.lifecycle.LiveData; import android.os.AsyncTask; public class SubredditRepository { diff --git a/app/src/main/java/SubredditDatabase/SubredditRoomDatabase.java b/app/src/main/java/SubredditDatabase/SubredditRoomDatabase.java index 764a3741..fa656b30 100644 --- a/app/src/main/java/SubredditDatabase/SubredditRoomDatabase.java +++ b/app/src/main/java/SubredditDatabase/SubredditRoomDatabase.java @@ -1,8 +1,8 @@ package SubredditDatabase; -import android.arch.persistence.room.Database; -import android.arch.persistence.room.Room; -import android.arch.persistence.room.RoomDatabase; +import androidx.room.Database; +import androidx.room.Room; +import androidx.room.RoomDatabase; import android.content.Context; @Database(entities = {SubredditData.class}, version = 1) diff --git a/app/src/main/java/SubredditDatabase/SubredditViewModel.java b/app/src/main/java/SubredditDatabase/SubredditViewModel.java index 19c2d726..a0dfa7c9 100644 --- a/app/src/main/java/SubredditDatabase/SubredditViewModel.java +++ b/app/src/main/java/SubredditDatabase/SubredditViewModel.java @@ -1,11 +1,11 @@ package SubredditDatabase; import android.app.Application; -import android.arch.lifecycle.AndroidViewModel; -import android.arch.lifecycle.LiveData; -import android.arch.lifecycle.ViewModel; -import android.arch.lifecycle.ViewModelProvider; -import android.support.annotation.NonNull; +import androidx.lifecycle.AndroidViewModel; +import androidx.lifecycle.LiveData; +import androidx.lifecycle.ViewModel; +import androidx.lifecycle.ViewModelProvider; +import androidx.annotation.NonNull; public class SubredditViewModel extends AndroidViewModel { private SubredditRepository mSubredditRepository; diff --git a/app/src/main/java/SubscribedSubredditDatabase/SubscribedSubredditDao.java b/app/src/main/java/SubscribedSubredditDatabase/SubscribedSubredditDao.java index 35ceac47..3a5aa9be 100644 --- a/app/src/main/java/SubscribedSubredditDatabase/SubscribedSubredditDao.java +++ b/app/src/main/java/SubscribedSubredditDatabase/SubscribedSubredditDao.java @@ -1,10 +1,10 @@ package SubscribedSubredditDatabase; -import android.arch.lifecycle.LiveData; -import android.arch.persistence.room.Dao; -import android.arch.persistence.room.Insert; -import android.arch.persistence.room.OnConflictStrategy; -import android.arch.persistence.room.Query; +import androidx.lifecycle.LiveData; +import androidx.room.Dao; +import androidx.room.Insert; +import androidx.room.OnConflictStrategy; +import androidx.room.Query; import java.util.List; diff --git a/app/src/main/java/SubscribedSubredditDatabase/SubscribedSubredditData.java b/app/src/main/java/SubscribedSubredditDatabase/SubscribedSubredditData.java index c6812768..4c6f1a49 100644 --- a/app/src/main/java/SubscribedSubredditDatabase/SubscribedSubredditData.java +++ b/app/src/main/java/SubscribedSubredditDatabase/SubscribedSubredditData.java @@ -1,9 +1,9 @@ package SubscribedSubredditDatabase; -import android.arch.persistence.room.ColumnInfo; -import android.arch.persistence.room.Entity; -import android.arch.persistence.room.PrimaryKey; -import android.support.annotation.NonNull; +import androidx.room.ColumnInfo; +import androidx.room.Entity; +import androidx.room.PrimaryKey; +import androidx.annotation.NonNull; @Entity(tableName = "subscribed_subreddits") public class SubscribedSubredditData { diff --git a/app/src/main/java/SubscribedSubredditDatabase/SubscribedSubredditRepository.java b/app/src/main/java/SubscribedSubredditDatabase/SubscribedSubredditRepository.java index 54b2ddfa..02bb7881 100644 --- a/app/src/main/java/SubscribedSubredditDatabase/SubscribedSubredditRepository.java +++ b/app/src/main/java/SubscribedSubredditDatabase/SubscribedSubredditRepository.java @@ -1,7 +1,7 @@ package SubscribedSubredditDatabase; import android.app.Application; -import android.arch.lifecycle.LiveData; +import androidx.lifecycle.LiveData; import android.os.AsyncTask; import java.util.List; diff --git a/app/src/main/java/SubscribedSubredditDatabase/SubscribedSubredditRoomDatabase.java b/app/src/main/java/SubscribedSubredditDatabase/SubscribedSubredditRoomDatabase.java index abde79b4..48602fcc 100644 --- a/app/src/main/java/SubscribedSubredditDatabase/SubscribedSubredditRoomDatabase.java +++ b/app/src/main/java/SubscribedSubredditDatabase/SubscribedSubredditRoomDatabase.java @@ -1,8 +1,8 @@ package SubscribedSubredditDatabase; -import android.arch.persistence.room.Database; -import android.arch.persistence.room.Room; -import android.arch.persistence.room.RoomDatabase; +import androidx.room.Database; +import androidx.room.Room; +import androidx.room.RoomDatabase; import android.content.Context; @Database(entities = {SubscribedSubredditData.class}, version = 1) diff --git a/app/src/main/java/SubscribedSubredditDatabase/SubscribedSubredditViewModel.java b/app/src/main/java/SubscribedSubredditDatabase/SubscribedSubredditViewModel.java index 8598dd55..9ed8ac93 100644 --- a/app/src/main/java/SubscribedSubredditDatabase/SubscribedSubredditViewModel.java +++ b/app/src/main/java/SubscribedSubredditDatabase/SubscribedSubredditViewModel.java @@ -1,8 +1,8 @@ package SubscribedSubredditDatabase; import android.app.Application; -import android.arch.lifecycle.AndroidViewModel; -import android.arch.lifecycle.LiveData; +import androidx.lifecycle.AndroidViewModel; +import androidx.lifecycle.LiveData; import java.util.List; diff --git a/app/src/main/java/SubscribedUserDatabase/SubscribedUserDao.java b/app/src/main/java/SubscribedUserDatabase/SubscribedUserDao.java index e1810eec..711b02a6 100644 --- a/app/src/main/java/SubscribedUserDatabase/SubscribedUserDao.java +++ b/app/src/main/java/SubscribedUserDatabase/SubscribedUserDao.java @@ -1,10 +1,10 @@ package SubscribedUserDatabase; -import android.arch.lifecycle.LiveData; -import android.arch.persistence.room.Dao; -import android.arch.persistence.room.Insert; -import android.arch.persistence.room.OnConflictStrategy; -import android.arch.persistence.room.Query; +import androidx.lifecycle.LiveData; +import androidx.room.Dao; +import androidx.room.Insert; +import androidx.room.OnConflictStrategy; +import androidx.room.Query; import java.util.List; diff --git a/app/src/main/java/SubscribedUserDatabase/SubscribedUserData.java b/app/src/main/java/SubscribedUserDatabase/SubscribedUserData.java index 41947efe..98c5a971 100644 --- a/app/src/main/java/SubscribedUserDatabase/SubscribedUserData.java +++ b/app/src/main/java/SubscribedUserDatabase/SubscribedUserData.java @@ -1,9 +1,9 @@ package SubscribedUserDatabase; -import android.arch.persistence.room.ColumnInfo; -import android.arch.persistence.room.Entity; -import android.arch.persistence.room.PrimaryKey; -import android.support.annotation.NonNull; +import androidx.room.ColumnInfo; +import androidx.room.Entity; +import androidx.room.PrimaryKey; +import androidx.annotation.NonNull; @Entity(tableName = "subscribed_users") public class SubscribedUserData { diff --git a/app/src/main/java/SubscribedUserDatabase/SubscribedUserRepository.java b/app/src/main/java/SubscribedUserDatabase/SubscribedUserRepository.java index 5cab5fa8..10549113 100644 --- a/app/src/main/java/SubscribedUserDatabase/SubscribedUserRepository.java +++ b/app/src/main/java/SubscribedUserDatabase/SubscribedUserRepository.java @@ -1,7 +1,7 @@ package SubscribedUserDatabase; import android.app.Application; -import android.arch.lifecycle.LiveData; +import androidx.lifecycle.LiveData; import android.os.AsyncTask; import java.util.List; diff --git a/app/src/main/java/SubscribedUserDatabase/SubscribedUserRoomDatabase.java b/app/src/main/java/SubscribedUserDatabase/SubscribedUserRoomDatabase.java index cf3ea59d..12e6fb90 100644 --- a/app/src/main/java/SubscribedUserDatabase/SubscribedUserRoomDatabase.java +++ b/app/src/main/java/SubscribedUserDatabase/SubscribedUserRoomDatabase.java @@ -1,8 +1,8 @@ package SubscribedUserDatabase; -import android.arch.persistence.room.Database; -import android.arch.persistence.room.Room; -import android.arch.persistence.room.RoomDatabase; +import androidx.room.Database; +import androidx.room.Room; +import androidx.room.RoomDatabase; import android.content.Context; @Database(entities = {SubscribedUserData.class}, version = 1) diff --git a/app/src/main/java/SubscribedUserDatabase/SubscribedUserViewModel.java b/app/src/main/java/SubscribedUserDatabase/SubscribedUserViewModel.java index 858fac48..ed1db58f 100644 --- a/app/src/main/java/SubscribedUserDatabase/SubscribedUserViewModel.java +++ b/app/src/main/java/SubscribedUserDatabase/SubscribedUserViewModel.java @@ -1,8 +1,8 @@ package SubscribedUserDatabase; import android.app.Application; -import android.arch.lifecycle.AndroidViewModel; -import android.arch.lifecycle.LiveData; +import androidx.lifecycle.AndroidViewModel; +import androidx.lifecycle.LiveData; import java.util.List; diff --git a/app/src/main/java/User/UserDao.java b/app/src/main/java/User/UserDao.java index 4ce2536b..2bf7b824 100644 --- a/app/src/main/java/User/UserDao.java +++ b/app/src/main/java/User/UserDao.java @@ -1,10 +1,10 @@ package User; -import android.arch.lifecycle.LiveData; -import android.arch.persistence.room.Dao; -import android.arch.persistence.room.Insert; -import android.arch.persistence.room.OnConflictStrategy; -import android.arch.persistence.room.Query; +import androidx.lifecycle.LiveData; +import androidx.room.Dao; +import androidx.room.Insert; +import androidx.room.OnConflictStrategy; +import androidx.room.Query; @Dao public interface UserDao { diff --git a/app/src/main/java/User/UserData.java b/app/src/main/java/User/UserData.java index a3b15b0e..c334c289 100644 --- a/app/src/main/java/User/UserData.java +++ b/app/src/main/java/User/UserData.java @@ -1,8 +1,8 @@ package User; -import android.arch.persistence.room.ColumnInfo; -import android.arch.persistence.room.Entity; -import android.support.annotation.NonNull; +import androidx.room.ColumnInfo; +import androidx.room.Entity; +import androidx.annotation.NonNull; import SubscribedUserDatabase.SubscribedUserData; diff --git a/app/src/main/java/User/UserRepository.java b/app/src/main/java/User/UserRepository.java index d505db2b..b9e36ea4 100644 --- a/app/src/main/java/User/UserRepository.java +++ b/app/src/main/java/User/UserRepository.java @@ -1,7 +1,7 @@ package User; import android.app.Application; -import android.arch.lifecycle.LiveData; +import androidx.lifecycle.LiveData; import android.os.AsyncTask; public class UserRepository { diff --git a/app/src/main/java/User/UserRoomDatabase.java b/app/src/main/java/User/UserRoomDatabase.java index 288400a6..7faa7e2c 100644 --- a/app/src/main/java/User/UserRoomDatabase.java +++ b/app/src/main/java/User/UserRoomDatabase.java @@ -1,8 +1,8 @@ package User; -import android.arch.persistence.room.Database; -import android.arch.persistence.room.Room; -import android.arch.persistence.room.RoomDatabase; +import androidx.room.Database; +import androidx.room.Room; +import androidx.room.RoomDatabase; import android.content.Context; @Database(entities = {UserData.class}, version = 1) diff --git a/app/src/main/java/User/UserViewModel.java b/app/src/main/java/User/UserViewModel.java index a006e253..aab98645 100644 --- a/app/src/main/java/User/UserViewModel.java +++ b/app/src/main/java/User/UserViewModel.java @@ -1,13 +1,11 @@ package User; import android.app.Application; -import android.arch.lifecycle.AndroidViewModel; -import android.arch.lifecycle.LiveData; -import android.arch.lifecycle.ViewModel; -import android.arch.lifecycle.ViewModelProvider; -import android.support.annotation.NonNull; - -import SubredditDatabase.SubredditViewModel; +import androidx.lifecycle.AndroidViewModel; +import androidx.lifecycle.LiveData; +import androidx.lifecycle.ViewModel; +import androidx.lifecycle.ViewModelProvider; +import androidx.annotation.NonNull; public class UserViewModel extends AndroidViewModel { private UserRepository mSubredditRepository; diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/AccessTokenAuthenticator.java b/app/src/main/java/ml/docilealligator/infinityforreddit/AccessTokenAuthenticator.java index b7f8e104..2aebbd52 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/AccessTokenAuthenticator.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/AccessTokenAuthenticator.java @@ -1,8 +1,6 @@ package ml.docilealligator.infinityforreddit; import android.content.SharedPreferences; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; import android.util.Log; import org.json.JSONException; @@ -12,6 +10,8 @@ import java.io.IOException; import java.util.HashMap; import java.util.Map; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import okhttp3.Authenticator; import okhttp3.Headers; import okhttp3.Request; @@ -31,7 +31,7 @@ class AccessTokenAuthenticator implements Authenticator { @Nullable @Override - public Request authenticate(@NonNull Route route, @NonNull Response response) throws IOException { + public Request authenticate(@NonNull Route route, @NonNull Response response) { if (response.code() == 401) { String accessToken = response.request().header(RedditUtils.AUTHORIZATION_KEY).substring(RedditUtils.AUTHORIZATION_BASE.length()); synchronized (this) { diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/CommentAdapter.java b/app/src/main/java/ml/docilealligator/infinityforreddit/CommentAdapter.java index 44bc7fe8..1ec848ad 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/CommentAdapter.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/CommentAdapter.java @@ -1,16 +1,16 @@ package ml.docilealligator.infinityforreddit; -import android.arch.paging.PagedListAdapter; +import androidx.paging.PagedListAdapter; import android.content.Context; import android.content.Intent; import android.content.SharedPreferences; import android.graphics.ColorFilter; import android.net.Uri; -import android.support.annotation.NonNull; -import android.support.customtabs.CustomTabsIntent; -import android.support.v4.content.ContextCompat; -import android.support.v7.util.DiffUtil; -import android.support.v7.widget.RecyclerView; +import androidx.annotation.NonNull; +import androidx.browser.customtabs.CustomTabsIntent; +import androidx.core.content.ContextCompat; +import androidx.recyclerview.widget.DiffUtil; +import androidx.recyclerview.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/CommentDataSource.java b/app/src/main/java/ml/docilealligator/infinityforreddit/CommentDataSource.java index 9e98f29a..99084dbf 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/CommentDataSource.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/CommentDataSource.java @@ -1,8 +1,8 @@ package ml.docilealligator.infinityforreddit; -import android.arch.lifecycle.MutableLiveData; -import android.arch.paging.PageKeyedDataSource; -import android.support.annotation.NonNull; +import androidx.lifecycle.MutableLiveData; +import androidx.paging.PageKeyedDataSource; +import androidx.annotation.NonNull; import android.util.Log; import java.util.ArrayList; diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/CommentDataSourceFactory.java b/app/src/main/java/ml/docilealligator/infinityforreddit/CommentDataSourceFactory.java index 2c149dbe..1d16e2d2 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/CommentDataSourceFactory.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/CommentDataSourceFactory.java @@ -1,7 +1,7 @@ package ml.docilealligator.infinityforreddit; -import android.arch.lifecycle.MutableLiveData; -import android.arch.paging.DataSource; +import androidx.lifecycle.MutableLiveData; +import androidx.paging.DataSource; import java.util.Locale; diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/CommentMultiLevelRecyclerViewAdapter.java b/app/src/main/java/ml/docilealligator/infinityforreddit/CommentMultiLevelRecyclerViewAdapter.java index 84186625..08b465b3 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/CommentMultiLevelRecyclerViewAdapter.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/CommentMultiLevelRecyclerViewAdapter.java @@ -5,10 +5,10 @@ import android.content.Intent; import android.content.SharedPreferences; import android.graphics.ColorFilter; import android.net.Uri; -import android.support.annotation.NonNull; -import android.support.customtabs.CustomTabsIntent; -import android.support.v4.content.ContextCompat; -import android.support.v7.widget.RecyclerView; +import androidx.annotation.NonNull; +import androidx.browser.customtabs.CustomTabsIntent; +import androidx.core.content.ContextCompat; +import androidx.recyclerview.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/CommentViewModel.java b/app/src/main/java/ml/docilealligator/infinityforreddit/CommentViewModel.java index 12d28818..def1e287 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/CommentViewModel.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/CommentViewModel.java @@ -1,12 +1,12 @@ package ml.docilealligator.infinityforreddit; -import android.arch.lifecycle.LiveData; -import android.arch.lifecycle.Transformations; -import android.arch.lifecycle.ViewModel; -import android.arch.lifecycle.ViewModelProvider; -import android.arch.paging.LivePagedListBuilder; -import android.arch.paging.PagedList; -import android.support.annotation.NonNull; +import androidx.lifecycle.LiveData; +import androidx.lifecycle.Transformations; +import androidx.lifecycle.ViewModel; +import androidx.lifecycle.ViewModelProvider; +import androidx.paging.LivePagedListBuilder; +import androidx.paging.PagedList; +import androidx.annotation.NonNull; import java.util.Locale; diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/FetchComment.java b/app/src/main/java/ml/docilealligator/infinityforreddit/FetchComment.java index acd49008..0afb2978 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/FetchComment.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/FetchComment.java @@ -1,6 +1,6 @@ package ml.docilealligator.infinityforreddit; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import android.util.Log; import java.util.ArrayList; diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/FetchMyInfo.java b/app/src/main/java/ml/docilealligator/infinityforreddit/FetchMyInfo.java index d638db9c..393349a1 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/FetchMyInfo.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/FetchMyInfo.java @@ -1,7 +1,7 @@ package ml.docilealligator.infinityforreddit; import android.content.SharedPreferences; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import android.util.Log; import retrofit2.Call; diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/FetchSubredditData.java b/app/src/main/java/ml/docilealligator/infinityforreddit/FetchSubredditData.java index 3949e667..f3f1536b 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/FetchSubredditData.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/FetchSubredditData.java @@ -1,6 +1,6 @@ package ml.docilealligator.infinityforreddit; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import android.util.Log; import retrofit2.Call; diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/FetchSubscribedThing.java b/app/src/main/java/ml/docilealligator/infinityforreddit/FetchSubscribedThing.java index 691d170b..c0a96870 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/FetchSubscribedThing.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/FetchSubscribedThing.java @@ -1,7 +1,7 @@ package ml.docilealligator.infinityforreddit; import android.content.SharedPreferences; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import android.util.Log; import java.util.ArrayList; diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/FetchUserData.java b/app/src/main/java/ml/docilealligator/infinityforreddit/FetchUserData.java index 9bfcf7c3..7415be7e 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/FetchUserData.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/FetchUserData.java @@ -1,6 +1,6 @@ package ml.docilealligator.infinityforreddit; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import android.util.Log; import User.UserData; diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/LoginActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/LoginActivity.java index 605d2d23..5e392a2c 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/LoginActivity.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/LoginActivity.java @@ -6,7 +6,7 @@ import android.content.SharedPreferences; import android.graphics.Bitmap; import android.net.Uri; import android.os.Bundle; -import android.support.v7.app.AppCompatActivity; +import androidx.appcompat.app.AppCompatActivity; import android.view.MenuItem; import android.webkit.WebView; import android.webkit.WebViewClient; diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/MainActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/MainActivity.java index 4e4a30d2..bbd6e60c 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/MainActivity.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/MainActivity.java @@ -1,19 +1,19 @@ package ml.docilealligator.infinityforreddit; -import android.arch.lifecycle.ViewModelProviders; +import androidx.lifecycle.ViewModelProviders; import android.content.Context; import android.content.Intent; import android.content.SharedPreferences; import android.os.AsyncTask; import android.os.Bundle; -import android.support.v4.app.Fragment; -import android.support.v4.view.GravityCompat; -import android.support.v4.widget.DrawerLayout; -import android.support.v7.app.ActionBarDrawerToggle; -import android.support.v7.app.AppCompatActivity; -import android.support.v7.widget.LinearLayoutManager; -import android.support.v7.widget.RecyclerView; -import android.support.v7.widget.Toolbar; +import androidx.fragment.app.Fragment; +import androidx.core.view.GravityCompat; +import androidx.drawerlayout.widget.DrawerLayout; +import androidx.appcompat.app.ActionBarDrawerToggle; +import androidx.appcompat.app.AppCompatActivity; +import androidx.recyclerview.widget.LinearLayoutManager; +import androidx.recyclerview.widget.RecyclerView; +import androidx.appcompat.widget.Toolbar; import android.view.Menu; import android.view.MenuItem; import android.view.View; diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/PostDataSource.java b/app/src/main/java/ml/docilealligator/infinityforreddit/PostDataSource.java index 6f374fb9..6c4ddb8c 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/PostDataSource.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/PostDataSource.java @@ -1,8 +1,8 @@ package ml.docilealligator.infinityforreddit; -import android.arch.lifecycle.MutableLiveData; -import android.arch.paging.PageKeyedDataSource; -import android.support.annotation.NonNull; +import androidx.lifecycle.MutableLiveData; +import androidx.paging.PageKeyedDataSource; +import androidx.annotation.NonNull; import android.util.Log; import java.util.ArrayList; diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/PostDataSourceFactory.java b/app/src/main/java/ml/docilealligator/infinityforreddit/PostDataSourceFactory.java index 58f67d42..1f8d0ccc 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/PostDataSourceFactory.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/PostDataSourceFactory.java @@ -1,7 +1,7 @@ package ml.docilealligator.infinityforreddit; -import android.arch.lifecycle.MutableLiveData; -import android.arch.paging.DataSource; +import androidx.lifecycle.MutableLiveData; +import androidx.paging.DataSource; import java.util.Locale; diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/PostFragment.java b/app/src/main/java/ml/docilealligator/infinityforreddit/PostFragment.java index 28ad4cef..493eb616 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/PostFragment.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/PostFragment.java @@ -1,15 +1,15 @@ package ml.docilealligator.infinityforreddit; -import android.arch.lifecycle.ViewModelProviders; +import androidx.lifecycle.ViewModelProviders; import android.content.Context; import android.content.SharedPreferences; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.design.widget.CoordinatorLayout; -import android.support.v4.app.Fragment; -import android.support.v7.widget.LinearLayoutManager; -import android.support.v7.widget.RecyclerView; +import androidx.annotation.NonNull; +import androidx.coordinatorlayout.widget.CoordinatorLayout; +import androidx.fragment.app.Fragment; +import androidx.recyclerview.widget.LinearLayoutManager; +import androidx.recyclerview.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/PostRecyclerViewAdapter.java b/app/src/main/java/ml/docilealligator/infinityforreddit/PostRecyclerViewAdapter.java index d2ca18ea..657919ed 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/PostRecyclerViewAdapter.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/PostRecyclerViewAdapter.java @@ -1,21 +1,21 @@ package ml.docilealligator.infinityforreddit; -import android.arch.paging.PagedListAdapter; +import androidx.paging.PagedListAdapter; import android.content.Context; import android.content.Intent; import android.content.SharedPreferences; import android.graphics.ColorFilter; import android.graphics.drawable.Drawable; import android.net.Uri; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.customtabs.CustomTabsIntent; -import android.support.design.card.MaterialCardView; -import android.support.design.chip.Chip; -import android.support.v4.content.ContextCompat; -import android.support.v7.util.DiffUtil; -import android.support.v7.widget.CardView; -import android.support.v7.widget.RecyclerView; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.browser.customtabs.CustomTabsIntent; +import com.google.android.material.card.MaterialCardView; +import com.google.android.material.chip.Chip; +import androidx.core.content.ContextCompat; +import androidx.recyclerview.widget.DiffUtil; +import androidx.cardview.widget.CardView; +import androidx.recyclerview.widget.RecyclerView; import android.util.Log; import android.view.LayoutInflater; import android.view.View; diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/PostViewModel.java b/app/src/main/java/ml/docilealligator/infinityforreddit/PostViewModel.java index 8bfc4560..93d51f25 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/PostViewModel.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/PostViewModel.java @@ -1,12 +1,12 @@ package ml.docilealligator.infinityforreddit; -import android.arch.lifecycle.LiveData; -import android.arch.lifecycle.Transformations; -import android.arch.lifecycle.ViewModel; -import android.arch.lifecycle.ViewModelProvider; -import android.arch.paging.LivePagedListBuilder; -import android.arch.paging.PagedList; -import android.support.annotation.NonNull; +import androidx.lifecycle.LiveData; +import androidx.lifecycle.Transformations; +import androidx.lifecycle.ViewModel; +import androidx.lifecycle.ViewModelProvider; +import androidx.paging.LivePagedListBuilder; +import androidx.paging.PagedList; +import androidx.annotation.NonNull; import java.util.Locale; diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/SharedPreferencesUtils.java b/app/src/main/java/ml/docilealligator/infinityforreddit/SharedPreferencesUtils.java index 5ab2286d..7df06afc 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/SharedPreferencesUtils.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/SharedPreferencesUtils.java @@ -10,9 +10,6 @@ public class SharedPreferencesUtils { static final String AUTH_CODE_KEY = "code"; public static final String ACCESS_TOKEN_KEY = "accessToken"; static final String REFRESH_TOKEN_KEY = "refreshToken"; - static final String QUERY_ACCESS_TOKEN_TIME_KEY = "queryAccessTokenTime"; - static final String ACCESS_TOKEN_EXPIRE_INTERVAL_KEY = "accessTokenExpireInterval"; - static final String MODHASH_KEY = "modhash"; static final String USER_KEY = "user"; static final String PROFILE_IMAGE_URL_KEY = "profileImageUrl"; static final String BANNER_IMAGE_URL_KEY = "bannerImageUrl"; diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/SubredditSubscription.java b/app/src/main/java/ml/docilealligator/infinityforreddit/SubredditSubscription.java index 4a5f9ef5..ceb73e3b 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/SubredditSubscription.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/SubredditSubscription.java @@ -2,7 +2,7 @@ package ml.docilealligator.infinityforreddit; import android.content.SharedPreferences; import android.os.AsyncTask; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import android.util.Log; import java.util.HashMap; diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/SubscribedSubredditRecyclerViewAdapter.java b/app/src/main/java/ml/docilealligator/infinityforreddit/SubscribedSubredditRecyclerViewAdapter.java index d4098c1b..305a2657 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/SubscribedSubredditRecyclerViewAdapter.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/SubscribedSubredditRecyclerViewAdapter.java @@ -2,8 +2,8 @@ package ml.docilealligator.infinityforreddit; import android.content.Context; import android.content.Intent; -import android.support.annotation.NonNull; -import android.support.v7.widget.RecyclerView; +import androidx.annotation.NonNull; +import androidx.recyclerview.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/SubscribedUserRecyclerViewAdapter.java b/app/src/main/java/ml/docilealligator/infinityforreddit/SubscribedUserRecyclerViewAdapter.java index 8f0e402e..a2fd1aab 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/SubscribedUserRecyclerViewAdapter.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/SubscribedUserRecyclerViewAdapter.java @@ -2,8 +2,8 @@ package ml.docilealligator.infinityforreddit; import android.content.Context; import android.content.Intent; -import android.support.annotation.NonNull; -import android.support.v7.widget.RecyclerView; +import androidx.annotation.NonNull; +import androidx.recyclerview.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/UserFollowing.java b/app/src/main/java/ml/docilealligator/infinityforreddit/UserFollowing.java index 92d5012c..ec069664 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/UserFollowing.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/UserFollowing.java @@ -2,7 +2,7 @@ package ml.docilealligator.infinityforreddit; import android.content.SharedPreferences; import android.os.AsyncTask; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import android.util.Log; import java.util.HashMap; diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/ViewImageActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/ViewImageActivity.java index 5d5fba7f..e610d28d 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/ViewImageActivity.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/ViewImageActivity.java @@ -15,12 +15,12 @@ import android.os.AsyncTask; import android.os.Build; import android.os.Bundle; import android.os.Environment; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v4.app.ActivityCompat; -import android.support.v4.content.ContextCompat; -import android.support.v7.app.ActionBar; -import android.support.v7.app.AppCompatActivity; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.core.app.ActivityCompat; +import androidx.core.content.ContextCompat; +import androidx.appcompat.app.ActionBar; +import androidx.appcompat.app.AppCompatActivity; import android.text.Spannable; import android.text.SpannableString; import android.text.style.ForegroundColorSpan; diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/ViewPostDetailActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/ViewPostDetailActivity.java index f6555da5..86bd6c9b 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/ViewPostDetailActivity.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/ViewPostDetailActivity.java @@ -7,16 +7,16 @@ import android.graphics.PorterDuff; import android.graphics.drawable.Drawable; import android.net.Uri; import android.os.Bundle; -import android.support.annotation.Nullable; -import android.support.customtabs.CustomTabsIntent; -import android.support.design.chip.Chip; -import android.support.design.widget.CoordinatorLayout; -import android.support.design.widget.Snackbar; -import android.support.v4.content.ContextCompat; -import android.support.v7.app.AppCompatActivity; -import android.support.v7.widget.CardView; -import android.support.v7.widget.DividerItemDecoration; -import android.support.v7.widget.LinearLayoutManager; +import androidx.annotation.Nullable; +import androidx.browser.customtabs.CustomTabsIntent; +import com.google.android.material.chip.Chip; +import androidx.coordinatorlayout.widget.CoordinatorLayout; +import com.google.android.material.snackbar.Snackbar; +import androidx.core.content.ContextCompat; +import androidx.appcompat.app.AppCompatActivity; +import androidx.cardview.widget.CardView; +import androidx.recyclerview.widget.DividerItemDecoration; +import androidx.recyclerview.widget.LinearLayoutManager; import android.view.MenuItem; import android.view.View; import android.widget.ImageView; diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/ViewSubredditDetailActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/ViewSubredditDetailActivity.java index d24bb0b1..831a22ff 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/ViewSubredditDetailActivity.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/ViewSubredditDetailActivity.java @@ -1,18 +1,18 @@ package ml.docilealligator.infinityforreddit; -import android.arch.lifecycle.ViewModelProviders; +import androidx.lifecycle.ViewModelProviders; import android.content.Intent; import android.content.SharedPreferences; import android.os.AsyncTask; import android.os.Bundle; -import android.support.design.chip.Chip; -import android.support.design.widget.AppBarLayout; -import android.support.design.widget.CollapsingToolbarLayout; -import android.support.design.widget.CoordinatorLayout; -import android.support.design.widget.Snackbar; -import android.support.v4.app.Fragment; -import android.support.v7.app.AppCompatActivity; -import android.support.v7.widget.Toolbar; +import com.google.android.material.chip.Chip; +import com.google.android.material.appbar.AppBarLayout; +import com.google.android.material.appbar.CollapsingToolbarLayout; +import androidx.coordinatorlayout.widget.CoordinatorLayout; +import com.google.android.material.snackbar.Snackbar; +import androidx.fragment.app.Fragment; +import androidx.appcompat.app.AppCompatActivity; +import androidx.appcompat.widget.Toolbar; import android.view.Menu; import android.view.MenuItem; import android.view.View; diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/ViewUserDetailActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/ViewUserDetailActivity.java index ed0f2437..c5dedf11 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/ViewUserDetailActivity.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/ViewUserDetailActivity.java @@ -1,18 +1,18 @@ package ml.docilealligator.infinityforreddit; -import android.arch.lifecycle.ViewModelProviders; +import androidx.lifecycle.ViewModelProviders; import android.content.Intent; import android.content.SharedPreferences; import android.os.AsyncTask; import android.os.Bundle; -import android.support.design.chip.Chip; -import android.support.design.widget.AppBarLayout; -import android.support.design.widget.CollapsingToolbarLayout; -import android.support.design.widget.CoordinatorLayout; -import android.support.design.widget.Snackbar; -import android.support.v4.app.Fragment; -import android.support.v7.app.AppCompatActivity; -import android.support.v7.widget.Toolbar; +import com.google.android.material.chip.Chip; +import com.google.android.material.appbar.AppBarLayout; +import com.google.android.material.appbar.CollapsingToolbarLayout; +import androidx.coordinatorlayout.widget.CoordinatorLayout; +import com.google.android.material.snackbar.Snackbar; +import androidx.fragment.app.Fragment; +import androidx.appcompat.app.AppCompatActivity; +import androidx.appcompat.widget.Toolbar; import android.view.MenuItem; import android.view.View; import android.view.ViewGroup; diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/ViewVideoActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/ViewVideoActivity.java index 2163fa12..6ef9b47e 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/ViewVideoActivity.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/ViewVideoActivity.java @@ -16,11 +16,11 @@ import android.net.Uri; import android.os.Build; import android.os.Bundle; import android.os.Environment; -import android.support.annotation.NonNull; -import android.support.v4.app.ActivityCompat; -import android.support.v4.content.ContextCompat; -import android.support.v7.app.ActionBar; -import android.support.v7.app.AppCompatActivity; +import androidx.annotation.NonNull; +import androidx.core.app.ActivityCompat; +import androidx.core.content.ContextCompat; +import androidx.appcompat.app.ActionBar; +import androidx.appcompat.app.AppCompatActivity; import android.text.Spannable; import android.text.SpannableString; import android.text.style.ForegroundColorSpan; diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/VoteThing.java b/app/src/main/java/ml/docilealligator/infinityforreddit/VoteThing.java index 432ad988..175bcf1b 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/VoteThing.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/VoteThing.java @@ -1,7 +1,7 @@ package ml.docilealligator.infinityforreddit; import android.content.SharedPreferences; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import android.util.Log; import java.util.HashMap; |