Migrate to AndroidX

This commit is contained in:
xynngh
2019-08-31 15:26:04 +04:00
parent 57b4ac09da
commit 8dbb3710aa
16 changed files with 44 additions and 44 deletions

View File

@@ -31,8 +31,8 @@ dependencies {
implementation 'commons-codec:commons-codec:1.12' // beware: a version included in Android is used instead implementation 'commons-codec:commons-codec:1.12' // beware: a version included in Android is used instead
implementation fileTree(dir: 'libs', include: ['*.jar']) implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:28.0.0' implementation 'androidx.appcompat:appcompat:1.0.2'
implementation 'com.android.support.constraint:constraint-layout:1.1.3' implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'com.android.support:design:28.0.0' implementation 'com.google.android.material:material:1.0.0'
implementation 'android.arch.work:work-runtime:1.0.1' implementation 'androidx.work:work-runtime:2.2.0'
} }

View File

@@ -5,7 +5,7 @@ import android.content.ComponentName;
import android.content.Context; import android.content.Context;
import android.content.Intent; import android.content.Intent;
import android.content.pm.PackageManager; import android.content.pm.PackageManager;
import android.support.annotation.NonNull; import androidx.annotation.NonNull;
import android.telephony.TelephonyManager; import android.telephony.TelephonyManager;
import com.android.internal.telephony.ITelephony; import com.android.internal.telephony.ITelephony;

View File

@@ -1,10 +1,10 @@
package dummydomain.yetanothercallblocker; package dummydomain.yetanothercallblocker;
import android.content.res.ColorStateList; import android.content.res.ColorStateList;
import android.support.annotation.NonNull; import androidx.annotation.NonNull;
import android.support.v4.widget.ImageViewCompat; import androidx.core.widget.ImageViewCompat;
import android.support.v7.widget.AppCompatImageView; import androidx.appcompat.widget.AppCompatImageView;
import android.support.v7.widget.RecyclerView; import androidx.recyclerview.widget.RecyclerView;
import android.text.TextUtils; import android.text.TextUtils;
import android.view.LayoutInflater; import android.view.LayoutInflater;
import android.view.View; import android.view.View;

View File

@@ -2,7 +2,7 @@ package dummydomain.yetanothercallblocker;
import android.os.AsyncTask; import android.os.AsyncTask;
import android.os.Bundle; import android.os.Bundle;
import android.support.v7.app.AppCompatActivity; import androidx.appcompat.app.AppCompatActivity;
import android.view.View; import android.view.View;
import android.widget.EditText; import android.widget.EditText;
import android.widget.TextView; import android.widget.TextView;

View File

@@ -1,9 +1,9 @@
package dummydomain.yetanothercallblocker; package dummydomain.yetanothercallblocker;
import android.content.Intent; import android.content.Intent;
import android.support.annotation.NonNull; import androidx.annotation.NonNull;
import android.support.v7.app.AppCompatActivity; import androidx.appcompat.app.AppCompatActivity;
import android.support.v7.widget.SwitchCompat; import androidx.appcompat.widget.SwitchCompat;
import android.os.Bundle; import android.os.Bundle;
import android.view.Menu; import android.view.Menu;
import android.view.MenuItem; import android.view.MenuItem;

View File

@@ -8,10 +8,10 @@ import android.app.PendingIntent;
import android.content.Context; import android.content.Context;
import android.content.Intent; import android.content.Intent;
import android.os.Build; import android.os.Build;
import android.support.annotation.ColorInt; import androidx.annotation.ColorInt;
import android.support.annotation.DrawableRes; import androidx.annotation.DrawableRes;
import android.support.v4.app.NotificationCompat; import androidx.core.app.NotificationCompat;
import android.support.v4.app.NotificationManagerCompat; import androidx.core.app.NotificationManagerCompat;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;

View File

@@ -3,9 +3,9 @@ package dummydomain.yetanothercallblocker;
import android.Manifest; import android.Manifest;
import android.content.pm.PackageManager; import android.content.pm.PackageManager;
import android.os.Build; import android.os.Build;
import android.support.v4.app.ActivityCompat; import androidx.core.app.ActivityCompat;
import android.support.v4.content.ContextCompat; import androidx.core.content.ContextCompat;
import android.support.v7.app.AppCompatActivity; import androidx.appcompat.app.AppCompatActivity;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;

View File

@@ -4,10 +4,10 @@ import android.content.Context;
import android.content.Intent; import android.content.Intent;
import android.os.AsyncTask; import android.os.AsyncTask;
import android.os.Bundle; import android.os.Bundle;
import android.support.v7.app.AppCompatActivity; import androidx.appcompat.app.AppCompatActivity;
import android.support.v7.widget.DividerItemDecoration; import androidx.recyclerview.widget.DividerItemDecoration;
import android.support.v7.widget.LinearLayoutManager; import androidx.recyclerview.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView; import androidx.recyclerview.widget.RecyclerView;
import android.text.TextUtils; import android.text.TextUtils;
import android.view.View; import android.view.View;
import android.widget.TextView; import android.widget.TextView;

View File

@@ -1,7 +1,7 @@
package dummydomain.yetanothercallblocker; package dummydomain.yetanothercallblocker;
import android.content.Context; import android.content.Context;
import android.support.annotation.NonNull; import androidx.annotation.NonNull;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;

View File

@@ -1,7 +1,7 @@
package dummydomain.yetanothercallblocker.sia.model; package dummydomain.yetanothercallblocker.sia.model;
import android.content.Context; import android.content.Context;
import android.support.annotation.StringRes; import androidx.annotation.StringRes;
import dummydomain.yetanothercallblocker.R; import dummydomain.yetanothercallblocker.R;

View File

@@ -1,7 +1,7 @@
package dummydomain.yetanothercallblocker.sia.model.database; package dummydomain.yetanothercallblocker.sia.model.database;
import android.annotation.SuppressLint; import android.annotation.SuppressLint;
import android.support.annotation.Nullable; import androidx.annotation.Nullable;
import android.util.SparseArray; import android.util.SparseArray;
import org.slf4j.Logger; import org.slf4j.Logger;

View File

@@ -25,7 +25,7 @@
android:paddingRight="@dimen/item_padding" android:paddingRight="@dimen/item_padding"
android:showDividers="middle"> android:showDividers="middle">
<android.support.v7.widget.SwitchCompat <androidx.appcompat.widget.SwitchCompat
android:id="@+id/notificationsEnabledSwitch" android:id="@+id/notificationsEnabledSwitch"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@@ -33,7 +33,7 @@
android:layout_marginBottom="@dimen/text_margin" android:layout_marginBottom="@dimen/text_margin"
android:text="@string/incoming_call_notifications_enabled" /> android:text="@string/incoming_call_notifications_enabled" />
<android.support.v7.widget.SwitchCompat <androidx.appcompat.widget.SwitchCompat
android:id="@+id/blockCallsSwitch" android:id="@+id/blockCallsSwitch"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@@ -41,7 +41,7 @@
android:layout_marginBottom="@dimen/text_margin" android:layout_marginBottom="@dimen/text_margin"
android:text="@string/block_calls" /> android:text="@string/block_calls" />
<android.support.v7.widget.SwitchCompat <androidx.appcompat.widget.SwitchCompat
android:id="@+id/autoUpdateEnabledSwitch" android:id="@+id/autoUpdateEnabledSwitch"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android" <androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
@@ -7,14 +7,14 @@
android:fitsSystemWindows="true" android:fitsSystemWindows="true"
tools:context=".ReviewsActivity"> tools:context=".ReviewsActivity">
<android.support.design.widget.AppBarLayout <com.google.android.material.appbar.AppBarLayout
android:id="@+id/app_bar" android:id="@+id/app_bar"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="@dimen/app_bar_height" android:layout_height="@dimen/app_bar_height"
android:fitsSystemWindows="true" android:fitsSystemWindows="true"
android:theme="@style/AppTheme.AppBarOverlay"> android:theme="@style/AppTheme.AppBarOverlay">
<android.support.design.widget.CollapsingToolbarLayout <com.google.android.material.appbar.CollapsingToolbarLayout
android:id="@+id/toolbar_layout" android:id="@+id/toolbar_layout"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
@@ -25,16 +25,16 @@
<include layout="@layout/reviews_summary"/> <include layout="@layout/reviews_summary"/>
<android.support.v7.widget.Toolbar <androidx.appcompat.widget.Toolbar
android:id="@+id/toolbar" android:id="@+id/toolbar"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize" android:layout_height="?attr/actionBarSize"
app:layout_collapseMode="pin" app:layout_collapseMode="pin"
app:popupTheme="@style/AppTheme.PopupOverlay" /> app:popupTheme="@style/AppTheme.PopupOverlay" />
</android.support.design.widget.CollapsingToolbarLayout> </com.google.android.material.appbar.CollapsingToolbarLayout>
</android.support.design.widget.AppBarLayout> </com.google.android.material.appbar.AppBarLayout>
<include layout="@layout/content_reviews" /> <include layout="@layout/content_reviews" />
</android.support.design.widget.CoordinatorLayout> </androidx.coordinatorlayout.widget.CoordinatorLayout>

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<android.support.v4.widget.NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android" <androidx.core.widget.NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
@@ -22,11 +22,11 @@
android:text="" android:text=""
tools:text="@string/debug_default_test_number"/> tools:text="@string/debug_default_test_number"/>
<android.support.v7.widget.RecyclerView <androidx.recyclerview.widget.RecyclerView
android:id="@+id/reviews_list" android:id="@+id/reviews_list"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:paddingLeft="@dimen/item_padding" android:paddingLeft="@dimen/item_padding"
android:paddingRight="@dimen/item_padding"/> android:paddingRight="@dimen/item_padding"/>
</LinearLayout> </LinearLayout>
</android.support.v4.widget.NestedScrollView> </androidx.core.widget.NestedScrollView>

View File

@@ -4,7 +4,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="horizontal"> android:orientation="horizontal">
<android.support.v7.widget.AppCompatImageView <androidx.appcompat.widget.AppCompatImageView
android:id="@+id/rating_icon" android:id="@+id/rating_icon"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_width="wrap_content" android:layout_width="wrap_content"

View File

@@ -17,7 +17,7 @@
android:gravity="center_horizontal|center_vertical" android:gravity="center_horizontal|center_vertical"
android:orientation="horizontal"> android:orientation="horizontal">
<android.support.v7.widget.AppCompatImageView <androidx.appcompat.widget.AppCompatImageView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:src="@drawable/ic_thumb_down_black_24dp" android:src="@drawable/ic_thumb_down_black_24dp"
@@ -40,7 +40,7 @@
android:gravity="center_horizontal|center_vertical" android:gravity="center_horizontal|center_vertical"
android:orientation="horizontal"> android:orientation="horizontal">
<android.support.v7.widget.AppCompatImageView <androidx.appcompat.widget.AppCompatImageView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="match_parent" android:layout_height="match_parent"
android:src="@drawable/ic_thumbs_up_down_black_24dp" android:src="@drawable/ic_thumbs_up_down_black_24dp"
@@ -63,7 +63,7 @@
android:gravity="center_horizontal|center_vertical" android:gravity="center_horizontal|center_vertical"
android:orientation="horizontal"> android:orientation="horizontal">
<android.support.v7.widget.AppCompatImageView <androidx.appcompat.widget.AppCompatImageView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="match_parent" android:layout_height="match_parent"
android:src="@drawable/ic_thumb_up_black_24dp" android:src="@drawable/ic_thumb_up_black_24dp"