Commit f684fbe8 authored by Erik Duisters's avatar Erik Duisters

Migrate from android support libraries to androidx

Summary: Use the new AndroidX libraries instead of the legacy support libraries

Test Plan: Apply patch and verify everything works as before

Reviewers: #kde_connect, nicolasfella

Reviewed By: #kde_connect, nicolasfella

Subscribers: shubham, kdeconnect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D17818
parent 51c71f80
......@@ -241,7 +241,7 @@
</activity>
<provider
android:name="android.support.v4.content.FileProvider"
android:name="androidx.core.content.FileProvider"
android:authorities="org.kde.kdeconnect_tp.fileprovider"
android:exported="false"
android:grantUriPermissions="true">
......
apply plugin: 'com.android.application'
buildscript {
repositories {
jcenter()
......@@ -8,8 +10,6 @@ buildscript {
}
}
apply plugin: 'com.android.application'
android {
compileSdkVersion 28
defaultConfig {
......@@ -69,10 +69,10 @@ dependencies {
google()
}
implementation 'com.android.support:support-media-compat:28.0.0'
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support:preference-v7:28.0.0'
implementation 'com.android.support:design:28.0.0'
implementation 'androidx.media:media:1.0.0'
implementation 'androidx.appcompat:appcompat:1.0.2'
implementation 'androidx.preference:preference:1.0.0'
implementation 'com.google.android.material:material:1.0.0'
implementation 'com.jakewharton:disklrucache:2.0.2' //For caching album art bitmaps
implementation 'org.apache.sshd:sshd-core:0.14.0'
......@@ -80,8 +80,8 @@ dependencies {
implementation 'com.madgag.spongycastle:bcpkix-jdk15on:1.58.0.0' //For SSL certificate generation
implementation 'com.jakewharton:butterknife:9.0.0-rc2'
annotationProcessor 'com.jakewharton:butterknife-compiler:9.0.0-rc2'
implementation 'com.jakewharton:butterknife:9.0.0-rc3'
annotationProcessor 'com.jakewharton:butterknife-compiler:9.0.0-rc3'
// Testing
androidTestImplementation 'org.mockito:mockito-core:1.10.19'
......
android.enableJetifier=true
android.useAndroidX=true
\ No newline at end of file
......@@ -78,7 +78,7 @@
android:padding="16dp"
android:visibility="gone">
<android.support.v7.widget.AppCompatImageView
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/error_message_icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
......
<android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
<androidx.drawerlayout.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/drawer_layout"
......@@ -6,23 +6,23 @@
android:layout_height="match_parent"
android:fitsSystemWindows="true"> <!-- fitSystemWindows to make the drawer slide below the Lollipop transparent status bar -->
<android.support.design.widget.CoordinatorLayout
<androidx.coordinatorlayout.widget.CoordinatorLayout
android:id="@+id/coordinatorLayout"
android:layout_height="match_parent"
android:layout_width="match_parent"
tools:context="org.kde.kdeconnect.UserInterface.MainActivity">
<android.support.design.widget.AppBarLayout
<com.google.android.material.appbar.AppBarLayout
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar">
<android.support.v7.widget.Toolbar
<androidx.appcompat.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:elevation="8dp"/>
</android.support.design.widget.AppBarLayout>
</com.google.android.material.appbar.AppBarLayout>
<FrameLayout
android:id="@+id/container"
......@@ -30,9 +30,9 @@
android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior"/>
</android.support.design.widget.CoordinatorLayout>
</androidx.coordinatorlayout.widget.CoordinatorLayout>
<android.support.design.widget.NavigationView
<com.google.android.material.navigation.NavigationView
android:id="@+id/navigation_drawer"
android:layout_width="wrap_content"
android:layout_height="match_parent"
......@@ -40,4 +40,4 @@
app:headerLayout="@layout/nav_header"
style="?attr/mainNavigationViewStyle" />
</android.support.v4.widget.DrawerLayout>
</androidx.drawerlayout.widget.DrawerLayout>
<?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"
android:layout_width="match_parent"
android:layout_height="match_parent">
......@@ -12,7 +12,7 @@
android:addStatesFromChildren="true"
android:orientation="vertical" />
<android.support.design.widget.FloatingActionButton
<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/add_command_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
......@@ -33,4 +33,4 @@
android:textAlignment="center"
android:textSize="16sp" />
</android.support.design.widget.CoordinatorLayout>
\ No newline at end of file
</androidx.coordinatorlayout.widget.CoordinatorLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<android.support.v4.widget.SwipeRefreshLayout xmlns:android="http://schemas.android.com/apk/res/android"
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/refresh_list_layout"
android:layout_width="match_parent"
......@@ -17,4 +17,4 @@
android:paddingRight="16dip"
tools:context=".MainActivity" />
</android.support.v4.widget.SwipeRefreshLayout>
\ No newline at end of file
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
\ No newline at end of file
......@@ -13,7 +13,7 @@
android:paddingLeft="16dp"
android:paddingRight="16dp">
<android.support.v7.widget.AppCompatImageView
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/list_item_entry_icon"
android:layout_width="wrap_content"
android:layout_height="match_parent"
......
......@@ -147,7 +147,7 @@
android:layout_marginTop="8dip"
android:orientation="horizontal">
<android.support.v7.widget.AppCompatImageView
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/imageView"
android:layout_width="30dip"
android:layout_height="30dip"
......
<android.support.v7.widget.SwitchCompat
<androidx.appcompat.widget.SwitchCompat
android:id="@+id/dark_theme"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
......
......@@ -70,7 +70,7 @@
</RelativeLayout>
<android.support.v7.widget.AppCompatImageButton
<androidx.appcompat.widget.AppCompatImageButton
android:id="@+id/settingsButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
......
......@@ -32,7 +32,6 @@ import android.net.ConnectivityManager;
import android.os.Binder;
import android.os.Build;
import android.os.IBinder;
import android.support.v4.app.NotificationCompat;
import android.text.TextUtils;
import android.util.Log;
......@@ -53,6 +52,8 @@ import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantLock;
import androidx.core.app.NotificationCompat;
//import org.kde.kdeconnect.Backends.BluetoothBackend.BluetoothLinkProvider;
public class BackgroundService extends Service {
......
......@@ -30,8 +30,6 @@ import android.content.res.Resources;
import android.graphics.drawable.Drawable;
import android.os.Build;
import android.preference.PreferenceManager;
import android.support.v4.app.NotificationCompat;
import android.support.v4.content.ContextCompat;
import android.util.Base64;
import android.util.Log;
......@@ -61,6 +59,9 @@ import java.util.Vector;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.CopyOnWriteArrayList;
import androidx.core.app.NotificationCompat;
import androidx.core.content.ContextCompat;
public class Device implements BaseLink.PacketReceiver {
private final Context context;
......
......@@ -28,8 +28,6 @@ import android.net.Uri;
import android.os.Build;
import android.provider.ContactsContract;
import android.provider.ContactsContract.PhoneLookup;
import android.support.annotation.RequiresApi;
import android.support.v4.util.LongSparseArray;
import android.util.Base64;
import android.util.Base64OutputStream;
import android.util.Log;
......@@ -48,6 +46,9 @@ import java.util.List;
import java.util.Map;
import java.util.Set;
import androidx.annotation.RequiresApi;
import androidx.collection.LongSparseArray;
public class ContactsHelper {
......
......@@ -27,7 +27,6 @@ import android.net.Uri;
import android.os.Build;
import android.os.Looper;
import android.provider.Telephony;
import android.support.annotation.RequiresApi;
import android.util.Log;
import org.json.JSONException;
......@@ -41,6 +40,8 @@ import java.util.concurrent.locks.Condition;
import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantLock;
import androidx.annotation.RequiresApi;
public class SMSHelper {
/**
......
......@@ -25,7 +25,6 @@ import android.content.SharedPreferences;
import android.os.Build;
import android.os.Bundle;
import android.preference.PreferenceManager;
import android.support.v7.app.AppCompatActivity;
import android.view.GestureDetector;
import android.view.HapticFeedbackConstants;
import android.view.Menu;
......@@ -39,6 +38,8 @@ import org.kde.kdeconnect.BackgroundService;
import org.kde.kdeconnect.UserInterface.ThemeUtil;
import org.kde.kdeconnect_tp.R;
import androidx.appcompat.app.AppCompatActivity;
public class MousePadActivity extends AppCompatActivity implements GestureDetector.OnGestureListener, GestureDetector.OnDoubleTapListener, MousePadGestureDetector.OnGestureListener {
private String deviceId;
......
......@@ -23,12 +23,13 @@ package org.kde.kdeconnect.Plugins.MousePadPlugin;
import android.app.Activity;
import android.content.Intent;
import android.graphics.drawable.Drawable;
import android.support.v4.content.ContextCompat;
import org.kde.kdeconnect.NetworkPacket;
import org.kde.kdeconnect.Plugins.Plugin;
import org.kde.kdeconnect_tp.R;
import androidx.core.content.ContextCompat;
public class MousePadPlugin extends Plugin {
//public final static String PACKET_TYPE_MOUSEPAD = "kdeconnect.mousepad";
......
......@@ -28,7 +28,6 @@ import android.graphics.BitmapFactory;
import android.net.ConnectivityManager;
import android.os.AsyncTask;
import android.os.Build;
import android.support.v4.util.LruCache;
import android.util.Log;
import com.jakewharton.disklrucache.DiskLruCache;
......@@ -47,6 +46,8 @@ import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.util.ArrayList;
import androidx.collection.LruCache;
/**
* Handles the cache for album art
*/
......
......@@ -27,10 +27,6 @@ import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.preference.PreferenceManager;
import android.support.annotation.NonNull;
import android.support.v4.app.FragmentManager;
import android.support.v4.graphics.drawable.DrawableCompat;
import android.support.v7.app.AppCompatActivity;
import android.util.Log;
import android.view.KeyEvent;
import android.view.View;
......@@ -46,13 +42,18 @@ import org.kde.kdeconnect.Backends.BaseLink;
import org.kde.kdeconnect.Backends.BaseLinkProvider;
import org.kde.kdeconnect.BackgroundService;
import org.kde.kdeconnect.Device;
import org.kde.kdeconnect.Plugins.SystemvolumePlugin.SystemvolumeFragment;
import org.kde.kdeconnect.NetworkPacket;
import org.kde.kdeconnect.Plugins.SystemvolumePlugin.SystemvolumeFragment;
import org.kde.kdeconnect.UserInterface.ThemeUtil;
import org.kde.kdeconnect_tp.R;
import java.util.List;
import androidx.annotation.NonNull;
import androidx.appcompat.app.AppCompatActivity;
import androidx.core.graphics.drawable.DrawableCompat;
import androidx.fragment.app.FragmentManager;
public class MprisActivity extends AppCompatActivity {
private String deviceId;
......
......@@ -30,12 +30,9 @@ import android.os.Handler;
import android.os.Looper;
import android.os.Message;
import android.preference.PreferenceManager;
import android.support.v4.app.NotificationCompat;
import android.support.v4.app.TaskStackBuilder;
import android.support.v4.media.MediaMetadataCompat;
import android.support.v4.media.session.MediaSessionCompat;
import android.support.v4.media.session.PlaybackStateCompat;
import android.support.v4.media.app.NotificationCompat.MediaStyle;
import org.kde.kdeconnect.BackgroundService;
import org.kde.kdeconnect.Device;
......@@ -44,6 +41,10 @@ import org.kde.kdeconnect_tp.R;
import java.util.HashSet;
import androidx.core.app.NotificationCompat;
import androidx.core.app.TaskStackBuilder;
import androidx.media.app.NotificationCompat.MediaStyle;
/**
* Controls the mpris media control notification
* <p>
......@@ -319,7 +320,7 @@ public class MprisMediaSession implements SharedPreferences.OnSharedPreferenceCh
.setSmallIcon(R.drawable.ic_play_white)
.setShowWhen(false)
.setColor(service.getResources().getColor(R.color.primary))
.setVisibility(android.support.v4.app.NotificationCompat.VISIBILITY_PUBLIC);
.setVisibility(androidx.core.app.NotificationCompat.VISIBILITY_PUBLIC);
if (!notificationPlayer.getTitle().isEmpty()) {
notification.setContentTitle(notificationPlayer.getTitle());
......
......@@ -26,7 +26,6 @@ import android.graphics.Bitmap;
import android.graphics.drawable.Drawable;
import android.os.Handler;
import android.os.Message;
import android.support.v4.content.ContextCompat;
import android.util.Log;
import org.kde.kdeconnect.NetworkPacket;
......@@ -41,6 +40,8 @@ import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import androidx.core.content.ContextCompat;
public class MprisPlugin extends Plugin {
public class MprisPlayer {
private String player = "";
......
......@@ -24,9 +24,10 @@ import android.media.MediaMetadata;
import android.media.session.MediaController;
import android.media.session.PlaybackState;
import android.os.Build;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.annotation.RequiresApi;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.annotation.RequiresApi;
@RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)
......
......@@ -24,7 +24,8 @@ import android.media.MediaMetadata;
import android.media.session.MediaController;
import android.media.session.PlaybackState;
import android.os.Build;
import android.support.annotation.RequiresApi;
import androidx.annotation.RequiresApi;
@RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)
class MprisReceiverPlayer {
......
......@@ -31,8 +31,6 @@ import android.os.Build;
import android.os.Handler;
import android.os.Looper;
import android.provider.Settings;
import android.support.annotation.Nullable;
import android.support.annotation.RequiresApi;
import android.util.Log;
import org.kde.kdeconnect.Helpers.AppsHelper;
......@@ -45,6 +43,9 @@ import org.kde.kdeconnect_tp.R;
import java.util.HashMap;
import java.util.List;
import androidx.annotation.Nullable;
import androidx.annotation.RequiresApi;
@RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)
public class MprisReceiverPlugin extends Plugin implements MediaSessionManager.OnActiveSessionsChangedListener {
......
......@@ -30,7 +30,6 @@ import android.graphics.Canvas;
import android.graphics.drawable.BitmapDrawable;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
......@@ -41,13 +40,14 @@ import android.widget.CheckedTextView;
import android.widget.ListView;
import org.kde.kdeconnect.BackgroundService;
import org.kde.kdeconnect.Helpers.StringsHelper;
import org.kde.kdeconnect.UserInterface.ThemeUtil;
import org.kde.kdeconnect_tp.R;
import java.util.Arrays;
import java.util.List;
import androidx.appcompat.app.AppCompatActivity;
public class NotificationFilterActivity extends AppCompatActivity {
private AppDatabase appDatabase;
......
......@@ -26,12 +26,13 @@ import android.content.Intent;
import android.os.Build;
import android.service.notification.NotificationListenerService;
import android.service.notification.StatusBarNotification;
import android.support.annotation.RequiresApi;
import java.util.ArrayList;
import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantLock;
import androidx.annotation.RequiresApi;
@RequiresApi(api = Build.VERSION_CODES.JELLY_BEAN_MR2)
public class NotificationReceiver extends NotificationListenerService {
......
......@@ -38,8 +38,6 @@ import android.os.Build;
import android.os.Bundle;
import android.provider.Settings;
import android.service.notification.StatusBarNotification;
import android.support.annotation.RequiresApi;
import android.support.v4.app.NotificationCompat;
import android.text.SpannableString;
import android.util.Log;
......@@ -59,6 +57,9 @@ import java.util.HashSet;
import java.util.Map;
import java.util.Set;
import androidx.annotation.RequiresApi;
import androidx.core.app.NotificationCompat;
@TargetApi(Build.VERSION_CODES.JELLY_BEAN_MR2)
public class NotificationsPlugin extends Plugin implements NotificationReceiver.NotificationListener {
......
......@@ -26,7 +26,6 @@ import android.app.NotificationManager;
import android.app.PendingIntent;
import android.content.Context;
import android.content.Intent;
import android.support.v4.app.NotificationCompat;
import android.util.Log;
import org.kde.kdeconnect.Helpers.NotificationHelper;
......@@ -35,6 +34,8 @@ import org.kde.kdeconnect.Plugins.Plugin;
import org.kde.kdeconnect.UserInterface.MainActivity;
import org.kde.kdeconnect_tp.R;
import androidx.core.app.NotificationCompat;
public class PingPlugin extends Plugin {
......
......@@ -27,9 +27,6 @@ import android.content.Intent;
import android.content.pm.PackageManager;
import android.graphics.drawable.Drawable;
import android.os.Build;
import android.support.annotation.StringRes;
import android.support.v4.app.ActivityCompat;
import android.support.v4.content.ContextCompat;
import android.widget.Button;
import org.kde.kdeconnect.Device;
......@@ -38,6 +35,10 @@ import org.kde.kdeconnect.UserInterface.DeviceSettingsActivity;
import org.kde.kdeconnect.UserInterface.PluginSettingsActivity;
import org.kde.kdeconnect_tp.R;
import androidx.annotation.StringRes;
import androidx.core.app.ActivityCompat;
import androidx.core.content.ContextCompat;
public abstract class Plugin {
protected Device device;
......
......@@ -24,10 +24,8 @@ import android.content.Context;
import android.os.Build;
import android.os.Bundle;
import android.os.PowerManager;
import android.support.v4.media.VolumeProviderCompat;
import android.support.v4.media.session.MediaSessionCompat;
import android.support.v4.media.session.PlaybackStateCompat;
import android.support.v7.app.AppCompatActivity;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
......@@ -36,6 +34,9 @@ import org.kde.kdeconnect.BackgroundService;
import org.kde.kdeconnect.UserInterface.ThemeUtil;
import org.kde.kdeconnect_tp.R;
import androidx.appcompat.app.AppCompatActivity;
import androidx.media.VolumeProviderCompat;
public class PresenterActivity extends AppCompatActivity {
private MediaSessionCompat mMediaSession;
......
......@@ -24,13 +24,14 @@ package org.kde.kdeconnect.Plugins.PresenterPlugin;
import android.app.Activity;
import android.content.Intent;
import android.graphics.drawable.Drawable;
import android.support.v4.content.ContextCompat;
import android.view.KeyEvent;
import org.kde.kdeconnect.NetworkPacket;
import org.kde.kdeconnect.Plugins.Plugin;
import org.kde.kdeconnect_tp.R;
import androidx.core.content.ContextCompat;
import static org.kde.kdeconnect.Plugins.MousePadPlugin.KeyListenerView.SpecialKeysMap;
public class PresenterPlugin extends Plugin {
......
......@@ -27,7 +27,6 @@ import android.content.Context;
import android.content.Intent;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.support.v4.app.NotificationCompat;
import android.util.Log;
import org.kde.kdeconnect.Helpers.NotificationHelper;
......@@ -38,6 +37,8 @@ import org.kde.kdeconnect_tp.R;
import java.io.InputStream;
import androidx.core.app.NotificationCompat;
public class ReceiveNotificationsPlugin extends Plugin {
private final static String PACKET_TYPE_NOTIFICATION = "kdeconnect.notification";
......
......@@ -23,8 +23,6 @@ package org.kde.kdeconnect.Plugins.RemoteKeyboardPlugin;
import android.graphics.drawable.Drawable;
import android.os.SystemClock;
import android.preference.PreferenceManager;
import android.support.v4.content.ContextCompat;
import android.support.v4.util.Pair;
import android.util.Log;
import android.util.SparseIntArray;
import android.view.KeyEvent;
......@@ -40,6 +38,9 @@ import org.kde.kdeconnect_tp.R;
import java.util.ArrayList;
import java.util.concurrent.locks.ReentrantLock;
import androidx.core.content.ContextCompat;
import androidx.core.util.Pair;
public class RemoteKeyboardPlugin extends Plugin {
private final static String PACKET_TYPE_MOUSEPAD_REQUEST = "kdeconnect.mousepad.request";
......
......@@ -25,10 +25,6 @@ import android.content.ClipboardManager;
import android.content.Context;
import android.os.Build;
import android.os.Bundle;
import android.support.annotation.RequiresApi;
import android.support.design.widget.FloatingActionButton;
import android.support.v7.app.AlertDialog;
import android.support.v7.app.AppCompatActivity;
import android.util.Log;
import android.view.ContextMenu;
import android.view.MenuInflater;
......@@ -39,6 +35,8 @@ import android.widget.ListView;
import android.widget.TextView;
import android.widget.Toast;
import com.google.android.material.floatingactionbutton.FloatingActionButton;
import org.json.JSONException;
import org.json.JSONObject;
import org.kde.kdeconnect.BackgroundService;
......@@ -50,6 +48,10 @@ import org.kde.kdeconnect_tp.R;
import java.util.ArrayList;
import java.util.Collections;
import androidx.annotation.RequiresApi;
import androidx.appcompat.app.AlertDialog;
import androidx.appcompat.app.AppCompatActivity;
public class RunCommandActivity extends AppCompatActivity {
private String deviceId;
......
......@@ -24,7 +24,6 @@ package org.kde.kdeconnect.Plugins.RunCommandPlugin;
import android.app.Activity;
import android.content.Intent;
import android.graphics.drawable.Drawable;
import android.support.v4.content.ContextCompat;
import org.json.JSONException;
import org.json.JSONObject;
......@@ -36,6 +35,8 @@ import java.util.ArrayList;
import java.util.Collections;
import java.util.Iterator;
import androidx.core.content.ContextCompat;
public class RunCommandPlugin extends Plugin {
private final static String PACKET_TYPE_RUNCOMMAND = "kdeconnect.runcommand";
......
......@@ -3,8 +3,6 @@ package org.kde.kdeconnect.Plugins.RunCommandPlugin;
import android.net.Uri;
import android.os.Bundle;
import android.os.Vibrator;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;
import android.util.Log;
import android.view.Gravity;
import android.widget.TextView;
......@@ -13,6 +11,9 @@ import org.kde.kdeconnect.BackgroundService;
import org.kde.kdeconnect.Device;
import org.kde.kdeconnect_tp.R;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;
public class RunCommandUrlActivity extends AppCompatActivity {
@Override
......
......@@ -2,7 +2,6 @@ package org.kde.kdeconnect.Plugins.RunCommandPlugin;
import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.Window;
import android.widget.ListView;
......@@ -14,6 +13,8 @@ import org.kde.kdeconnect_tp.R;
import java.util.ArrayList;
import java.util.Collections;
import androidx.appcompat.app.AppCompatActivity;
public class RunCommandWidgetDeviceSelector extends AppCompatActivity {
@Override
protected void onCreate(Bundle bundle) {
......
......@@ -32,7 +32,6 @@ import android.os.Bundle;
import android.os.Handler;
import android.os.Looper;
import android.preference.PreferenceManager;
import android.support.v4.content.ContextCompat;
import android.telephony.PhoneNumberUtils;
import android.telephony.SmsManager;
import android.telephony.SmsMessage;
......@@ -56,6 +55,8 @@ import java.util.Map;
import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantLock;
import androidx.core.content.ContextCompat;
import static org.kde.kdeconnect.Plugins.TelephonyPlugin.TelephonyPlugin.PACKET_TYPE_TELEPHONY;
public class SMSPlugin extends Plugin {
......
......@@ -3,7 +3,6 @@ package org.kde.kdeconnect.Plugins.SharePlugin;
import android.app.NotificationManager;
import android.content.Context;