mirror of
https://github.com/syncthing/syncthing-android.git
synced 2024-11-29 15:51:17 +00:00
Migrate libraries to AndroidX (#458)
* Manifest: Add "android:requestLegacyExternalStorage="true"" (fixes #457) - I know this is not the fix everyone wants but it keeps Syncthing-Fork alive a little longer. See issue #457 to know why. * Migrate to AndroidX * Revert "Manifest: Add "android:requestLegacyExternalStorage="true""" This reverts commit 7089be89beebd5ec95c9b2fac08d20f65d4da171.
This commit is contained in:
parent
2c11e82a27
commit
574fb3eca0
53 changed files with 129 additions and 138 deletions
|
@ -4,8 +4,8 @@ apply plugin: 'com.github.triplet.play'
|
|||
|
||||
dependencies {
|
||||
implementation 'eu.chainfire:libsuperuser:1.1.0.201903290044'
|
||||
implementation 'com.android.support:design:28.0.0'
|
||||
implementation 'com.android.support:recyclerview-v7:28.0.0'
|
||||
implementation 'com.google.android.material:material:1.0.0'
|
||||
implementation 'androidx.recyclerview:recyclerview:1.0.0'
|
||||
implementation 'com.google.zxing:android-integration:3.3.0'
|
||||
implementation 'com.google.code.gson:gson:2.8.5'
|
||||
implementation 'org.mindrot:jbcrypt:0.4'
|
||||
|
@ -13,11 +13,11 @@ dependencies {
|
|||
implementation 'com.google.guava:guava:27.1-android'
|
||||
implementation 'com.annimon:stream:1.2.1'
|
||||
implementation 'com.android.volley:volley:1.1.1'
|
||||
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
|
||||
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
|
||||
implementation 'com.google.dagger:dagger:2.23.1'
|
||||
annotationProcessor "com.google.dagger:dagger-compiler:2.23.1"
|
||||
androidTestImplementation 'com.android.support.test:rules:1.0.2'
|
||||
androidTestImplementation 'com.android.support:support-annotations:28.0.0'
|
||||
androidTestImplementation 'androidx.test:rules:1.1.0'
|
||||
androidTestImplementation 'androidx.annotation:annotation:1.0.0'
|
||||
}
|
||||
|
||||
apply from: 'versions.gradle'
|
||||
|
@ -26,8 +26,8 @@ def ourVersionName = "${versionMajor}.${versionMinor}.${versionPatch}.${versionW
|
|||
|
||||
android {
|
||||
// Changes to these values need to be reflected in `.travis.yml`
|
||||
compileSdkVersion 28
|
||||
buildToolsVersion '28.0.3'
|
||||
compileSdkVersion 29
|
||||
buildToolsVersion '29.0.0'
|
||||
|
||||
buildTypes.debug.applicationIdSuffix ".debug"
|
||||
dataBinding.enabled = true
|
||||
|
@ -40,11 +40,11 @@ android {
|
|||
defaultConfig {
|
||||
applicationId "com.github.catfriend1.syncthingandroid"
|
||||
minSdkVersion 16
|
||||
targetSdkVersion 28
|
||||
targetSdkVersion 29
|
||||
versionCode ourVersionCode
|
||||
versionName ourVersionName
|
||||
testApplicationId 'com.github.catfriend1.syncthingandroid.test'
|
||||
testInstrumentationRunner 'android.support.test.runner.AndroidJUnitRunner'
|
||||
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
|
||||
}
|
||||
|
||||
signingConfigs {
|
||||
|
|
|
@ -9,8 +9,8 @@ import android.content.Intent;
|
|||
import android.content.SharedPreferences;
|
||||
import android.os.Bundle;
|
||||
import android.os.IBinder;
|
||||
import android.support.v7.app.AlertDialog;
|
||||
import android.support.v7.widget.SwitchCompat;
|
||||
import androidx.appcompat.app.AlertDialog;
|
||||
import androidx.appcompat.widget.SwitchCompat;
|
||||
import android.text.Editable;
|
||||
import android.text.TextUtils;
|
||||
import android.text.TextWatcher;
|
||||
|
@ -53,8 +53,8 @@ import java.util.Map;
|
|||
|
||||
import javax.inject.Inject;
|
||||
|
||||
import static android.support.v4.view.MarginLayoutParamsCompat.setMarginEnd;
|
||||
import static android.support.v4.view.MarginLayoutParamsCompat.setMarginStart;
|
||||
import static androidx.core.view.MarginLayoutParamsCompat.setMarginEnd;
|
||||
import static androidx.core.view.MarginLayoutParamsCompat.setMarginStart;
|
||||
import static android.text.TextUtils.isEmpty;
|
||||
import static android.view.View.VISIBLE;
|
||||
import static android.view.WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN;
|
||||
|
|
|
@ -16,11 +16,11 @@ import android.os.Build;
|
|||
import android.os.Bundle;
|
||||
import android.os.PowerManager;
|
||||
import android.provider.Settings;
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.v4.app.ActivityCompat;
|
||||
import android.support.v4.content.ContextCompat;
|
||||
import android.support.v4.view.PagerAdapter;
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.core.app.ActivityCompat;
|
||||
import androidx.core.content.ContextCompat;
|
||||
import androidx.viewpager.widget.PagerAdapter;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import android.text.Html;
|
||||
import android.util.Log;
|
||||
import android.view.LayoutInflater;
|
||||
|
|
|
@ -11,8 +11,8 @@ import android.net.Uri;
|
|||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.os.IBinder;
|
||||
import android.support.v4.provider.DocumentFile;
|
||||
import android.support.v7.widget.SwitchCompat;
|
||||
import androidx.documentfile.provider.DocumentFile;
|
||||
import androidx.appcompat.widget.SwitchCompat;
|
||||
import android.text.Editable;
|
||||
import android.text.TextUtils;
|
||||
import android.text.TextWatcher;
|
||||
|
@ -55,8 +55,8 @@ import java.util.concurrent.TimeUnit;
|
|||
|
||||
import javax.inject.Inject;
|
||||
|
||||
import static android.support.v4.view.MarginLayoutParamsCompat.setMarginEnd;
|
||||
import static android.support.v4.view.MarginLayoutParamsCompat.setMarginStart;
|
||||
import static androidx.core.view.MarginLayoutParamsCompat.setMarginEnd;
|
||||
import static androidx.core.view.MarginLayoutParamsCompat.setMarginStart;
|
||||
import static android.util.TypedValue.COMPLEX_UNIT_DIP;
|
||||
import static android.view.Gravity.CENTER_VERTICAL;
|
||||
import static android.view.ViewGroup.LayoutParams.WRAP_CONTENT;
|
||||
|
|
|
@ -8,9 +8,9 @@ import android.content.Intent;
|
|||
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.content.ContextCompat;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.core.content.ContextCompat;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
import android.view.Menu;
|
||||
|
|
|
@ -3,10 +3,9 @@ package com.nutomic.syncthingandroid.activities;
|
|||
import android.content.Intent;
|
||||
import android.os.AsyncTask;
|
||||
import android.os.Bundle;
|
||||
import android.support.v4.view.MenuItemCompat;
|
||||
import android.support.v7.widget.ShareActionProvider;
|
||||
import androidx.core.view.MenuItemCompat;
|
||||
import androidx.appcompat.widget.ShareActionProvider;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
import android.view.Menu;
|
||||
import android.view.MenuInflater;
|
||||
import android.view.MenuItem;
|
||||
|
@ -16,9 +15,6 @@ import android.widget.TextView;
|
|||
import com.nutomic.syncthingandroid.R;
|
||||
import com.nutomic.syncthingandroid.util.Util;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStreamReader;
|
||||
import java.lang.ref.WeakReference;
|
||||
import java.util.Arrays;
|
||||
import java.util.ArrayList;
|
||||
|
|
|
@ -13,21 +13,20 @@ import android.content.res.Configuration;
|
|||
import android.graphics.Bitmap;
|
||||
import android.graphics.drawable.BitmapDrawable;
|
||||
import android.Manifest;
|
||||
import android.net.Uri;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.os.IBinder;
|
||||
import android.support.design.widget.TabLayout;
|
||||
import android.support.v4.app.Fragment;
|
||||
import android.support.v4.app.FragmentManager;
|
||||
import android.support.v4.app.FragmentStatePagerAdapter;
|
||||
import android.support.v4.content.ContextCompat;
|
||||
import android.support.v4.view.GravityCompat;
|
||||
import android.support.v4.view.ViewPager;
|
||||
import android.support.v4.widget.DrawerLayout;
|
||||
import android.support.v7.widget.Toolbar;
|
||||
import android.support.v7.app.ActionBar;
|
||||
import android.support.v7.app.ActionBarDrawerToggle;
|
||||
import com.google.android.material.tabs.TabLayout;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.fragment.app.FragmentManager;
|
||||
import androidx.fragment.app.FragmentStatePagerAdapter;
|
||||
import androidx.core.content.ContextCompat;
|
||||
import androidx.core.view.GravityCompat;
|
||||
import androidx.viewpager.widget.ViewPager;
|
||||
import androidx.drawerlayout.widget.DrawerLayout;
|
||||
import androidx.appcompat.widget.Toolbar;
|
||||
import androidx.appcompat.app.ActionBar;
|
||||
import androidx.appcompat.app.ActionBarDrawerToggle;
|
||||
import android.util.DisplayMetrics;
|
||||
import android.util.Log;
|
||||
import android.util.TypedValue;
|
||||
|
@ -43,7 +42,6 @@ import android.widget.TextView;
|
|||
import com.annimon.stream.function.Consumer;
|
||||
import com.nutomic.syncthingandroid.R;
|
||||
import com.nutomic.syncthingandroid.SyncthingApp;
|
||||
import com.nutomic.syncthingandroid.activities.WebViewActivity;
|
||||
import com.nutomic.syncthingandroid.fragments.DeviceListFragment;
|
||||
import com.nutomic.syncthingandroid.fragments.DrawerFragment;
|
||||
import com.nutomic.syncthingandroid.fragments.FolderListFragment;
|
||||
|
|
|
@ -3,8 +3,8 @@ package com.nutomic.syncthingandroid.activities;
|
|||
import android.content.ComponentName;
|
||||
import android.os.Bundle;
|
||||
import android.os.IBinder;
|
||||
import android.support.v7.widget.LinearLayoutManager;
|
||||
import android.support.v7.widget.RecyclerView;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
import android.view.Menu;
|
||||
|
|
|
@ -23,9 +23,9 @@ import android.preference.Preference;
|
|||
import android.preference.PreferenceFragment;
|
||||
import android.preference.PreferenceManager;
|
||||
import android.preference.PreferenceScreen;
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.annotation.Nullable;
|
||||
import android.support.v7.widget.Toolbar;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.appcompat.widget.Toolbar;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
import android.util.TypedValue;
|
||||
|
@ -43,7 +43,6 @@ import com.google.common.base.Splitter;
|
|||
import com.google.common.collect.Iterables;
|
||||
import com.nutomic.syncthingandroid.R;
|
||||
import com.nutomic.syncthingandroid.SyncthingApp;
|
||||
import com.nutomic.syncthingandroid.activities.WebViewActivity;
|
||||
import com.nutomic.syncthingandroid.model.Device;
|
||||
import com.nutomic.syncthingandroid.model.Gui;
|
||||
import com.nutomic.syncthingandroid.model.Options;
|
||||
|
|
|
@ -5,7 +5,7 @@ import android.content.Context;
|
|||
import android.content.Intent;
|
||||
import android.content.SharedPreferences;
|
||||
import android.os.Bundle;
|
||||
import android.support.v7.widget.SwitchCompat;
|
||||
import androidx.appcompat.widget.SwitchCompat;
|
||||
import android.util.Log;
|
||||
import android.util.TypedValue;
|
||||
import android.view.LayoutInflater;
|
||||
|
@ -25,8 +25,8 @@ import java.util.Set;
|
|||
|
||||
import javax.inject.Inject;
|
||||
|
||||
import static android.support.v4.view.MarginLayoutParamsCompat.setMarginEnd;
|
||||
import static android.support.v4.view.MarginLayoutParamsCompat.setMarginStart;
|
||||
import static androidx.core.view.MarginLayoutParamsCompat.setMarginEnd;
|
||||
import static androidx.core.view.MarginLayoutParamsCompat.setMarginStart;
|
||||
import static android.util.TypedValue.COMPLEX_UNIT_DIP;
|
||||
import static android.view.Gravity.CENTER_VERTICAL;
|
||||
import static android.view.ViewGroup.LayoutParams.WRAP_CONTENT;
|
||||
|
|
|
@ -7,8 +7,8 @@ import android.content.ServiceConnection;
|
|||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.os.IBinder;
|
||||
import android.support.v7.app.ActionBar;
|
||||
import android.support.v7.widget.Toolbar;
|
||||
import androidx.appcompat.app.ActionBar;
|
||||
import androidx.appcompat.widget.Toolbar;
|
||||
// import android.util.Log;
|
||||
|
||||
import com.nutomic.syncthingandroid.R;
|
||||
|
|
|
@ -3,8 +3,8 @@ package com.nutomic.syncthingandroid.activities;
|
|||
import android.content.SharedPreferences;
|
||||
import android.os.Bundle;
|
||||
import android.preference.PreferenceManager;
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
import android.support.v7.app.AppCompatDelegate;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.appcompat.app.AppCompatDelegate;
|
||||
// import android.util.Log;
|
||||
|
||||
import com.nutomic.syncthingandroid.service.Constants;
|
||||
|
|
|
@ -5,8 +5,8 @@ import android.net.NetworkInfo;
|
|||
import android.net.wifi.WifiManager;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.support.v7.widget.LinearLayoutManager;
|
||||
import android.support.v7.widget.RecyclerView;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
import android.text.format.Formatter;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
|
|
|
@ -3,8 +3,8 @@ package com.nutomic.syncthingandroid.activities;
|
|||
import android.app.Activity;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.support.v4.app.Fragment;
|
||||
import android.support.v4.app.FragmentTransaction;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.fragment.app.FragmentTransaction;
|
||||
import android.view.View;
|
||||
import android.widget.AdapterView;
|
||||
import android.widget.Button;
|
||||
|
|
|
@ -4,8 +4,8 @@ import android.content.Intent;
|
|||
import android.content.SharedPreferences;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.support.annotation.Nullable;
|
||||
import android.support.v4.app.ListFragment;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.fragment.app.ListFragment;
|
||||
import android.util.Log;
|
||||
import android.view.Menu;
|
||||
import android.view.MenuInflater;
|
||||
|
|
|
@ -5,7 +5,7 @@ import android.content.Intent;
|
|||
import android.content.SharedPreferences;
|
||||
import android.os.Bundle;
|
||||
import android.preference.PreferenceManager;
|
||||
import android.support.v4.app.Fragment;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import android.util.Log;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
|
|
|
@ -4,8 +4,8 @@ import android.content.Intent;
|
|||
import android.content.SharedPreferences;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.support.annotation.Nullable;
|
||||
import android.support.v4.app.ListFragment;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.fragment.app.ListFragment;
|
||||
import android.util.Log;
|
||||
import android.view.Menu;
|
||||
import android.view.MenuInflater;
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
package com.nutomic.syncthingandroid.fragments;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.support.annotation.Nullable;
|
||||
import android.support.v4.app.Fragment;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
|
|
@ -4,9 +4,9 @@ import android.content.Intent;
|
|||
import android.content.SharedPreferences;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.support.annotation.Nullable;
|
||||
import android.support.v4.app.ListFragment;
|
||||
import android.support.v4.content.LocalBroadcastManager;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.fragment.app.ListFragment;
|
||||
import androidx.localbroadcastmanager.content.LocalBroadcastManager;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
import android.view.Menu;
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
package com.nutomic.syncthingandroid.fragments.dialog;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.support.annotation.Nullable;
|
||||
import android.support.v4.app.Fragment;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import android.text.Editable;
|
||||
import android.text.TextWatcher;
|
||||
import android.view.LayoutInflater;
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
package com.nutomic.syncthingandroid.fragments.dialog;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.support.annotation.Nullable;
|
||||
import android.support.v4.app.Fragment;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
package com.nutomic.syncthingandroid.fragments.dialog;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.support.annotation.Nullable;
|
||||
import android.support.v4.app.Fragment;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
|
|
@ -3,8 +3,8 @@ package com.nutomic.syncthingandroid.fragments.dialog;
|
|||
import android.app.Activity;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.support.annotation.Nullable;
|
||||
import android.support.v4.app.Fragment;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
package com.nutomic.syncthingandroid.fragments.dialog;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.support.annotation.Nullable;
|
||||
import android.support.v4.app.Fragment;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
|
|
@ -4,7 +4,7 @@ package com.nutomic.syncthingandroid.http;
|
|||
import android.content.Context;
|
||||
import android.graphics.Bitmap;
|
||||
import android.net.Uri;
|
||||
import android.support.annotation.Nullable;
|
||||
import androidx.annotation.Nullable;
|
||||
import android.util.Log;
|
||||
import android.widget.ImageView;
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@ package com.nutomic.syncthingandroid.http;
|
|||
|
||||
import android.content.Context;
|
||||
import android.net.Uri;
|
||||
import android.support.annotation.Nullable;
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.android.volley.Request;
|
||||
import com.google.common.base.Optional;
|
||||
|
|
|
@ -2,7 +2,7 @@ package com.nutomic.syncthingandroid.http;
|
|||
|
||||
import android.content.Context;
|
||||
import android.net.Uri;
|
||||
import android.support.annotation.Nullable;
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.google.common.base.Optional;
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@ package com.nutomic.syncthingandroid.http;
|
|||
|
||||
import android.content.Context;
|
||||
import android.net.Uri;
|
||||
import android.support.annotation.Nullable;
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.android.volley.Request;
|
||||
import com.google.common.base.Optional;
|
||||
|
|
|
@ -8,8 +8,8 @@ import android.content.Context;
|
|||
import android.content.Intent;
|
||||
import android.content.SharedPreferences;
|
||||
import android.os.Build;
|
||||
import android.support.annotation.StringRes;
|
||||
import android.support.v4.app.NotificationCompat;
|
||||
import androidx.annotation.StringRes;
|
||||
import androidx.core.app.NotificationCompat;
|
||||
import android.util.Log;
|
||||
|
||||
import com.nutomic.syncthingandroid.R;
|
||||
|
@ -17,7 +17,6 @@ import com.nutomic.syncthingandroid.SyncthingApp;
|
|||
import com.nutomic.syncthingandroid.activities.FirstStartActivity;
|
||||
import com.nutomic.syncthingandroid.activities.LogActivity;
|
||||
import com.nutomic.syncthingandroid.activities.MainActivity;
|
||||
import com.nutomic.syncthingandroid.service.Constants;
|
||||
import com.nutomic.syncthingandroid.service.SyncthingService.State;
|
||||
|
||||
import javax.inject.Inject;
|
||||
|
|
|
@ -18,13 +18,12 @@ import android.os.Build;
|
|||
import android.os.Handler;
|
||||
import android.os.Looper;
|
||||
import android.os.PowerManager;
|
||||
import android.support.annotation.Nullable;
|
||||
import android.support.v4.content.LocalBroadcastManager;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.localbroadcastmanager.content.LocalBroadcastManager;
|
||||
import android.util.Log;
|
||||
|
||||
import com.nutomic.syncthingandroid.R;
|
||||
import com.nutomic.syncthingandroid.SyncthingApp;
|
||||
import com.nutomic.syncthingandroid.service.ReceiverManager;
|
||||
import com.nutomic.syncthingandroid.util.JobUtils;
|
||||
|
||||
import java.util.HashSet;
|
||||
|
|
|
@ -4,12 +4,10 @@ import android.app.job.JobParameters;
|
|||
import android.app.job.JobService;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.support.annotation.RequiresApi;
|
||||
import android.support.v4.content.LocalBroadcastManager;
|
||||
import androidx.annotation.RequiresApi;
|
||||
import androidx.localbroadcastmanager.content.LocalBroadcastManager;
|
||||
// import android.util.Log;
|
||||
|
||||
import com.nutomic.syncthingandroid.service.Constants;
|
||||
import com.nutomic.syncthingandroid.service.RunConditionMonitor;
|
||||
import com.nutomic.syncthingandroid.util.JobUtils;
|
||||
|
||||
/**
|
||||
|
|
|
@ -9,8 +9,8 @@ import android.Manifest;
|
|||
import android.os.Build;
|
||||
import android.os.Handler;
|
||||
import android.os.Looper;
|
||||
import android.support.annotation.Nullable;
|
||||
import android.support.v4.content.ContextCompat;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.core.content.ContextCompat;
|
||||
import android.util.Log;
|
||||
|
||||
import com.android.PRNGFixes;
|
||||
|
|
|
@ -12,7 +12,7 @@ import android.os.Build;
|
|||
import android.os.Environment;
|
||||
import android.os.storage.StorageManager;
|
||||
import android.provider.DocumentsContract;
|
||||
import android.support.annotation.Nullable;
|
||||
import androidx.annotation.Nullable;
|
||||
import android.util.Log;
|
||||
import android.webkit.MimeTypeMap;
|
||||
import android.widget.Toast;
|
||||
|
|
|
@ -4,7 +4,7 @@ import android.annotation.TargetApi;
|
|||
import android.annotation.SuppressLint;
|
||||
import android.content.Context;
|
||||
import android.content.res.Resources;
|
||||
import android.support.v7.widget.RecyclerView;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
import android.net.Uri;
|
||||
import android.os.Build;
|
||||
// import android.util.Log;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package com.nutomic.syncthingandroid.views;
|
||||
|
||||
import android.content.Context;
|
||||
import android.support.v4.view.ViewPager;
|
||||
import androidx.viewpager.widget.ViewPager;
|
||||
import android.util.AttributeSet;
|
||||
import android.view.MotionEvent;
|
||||
|
||||
|
|
|
@ -2,8 +2,8 @@ package com.nutomic.syncthingandroid.views;
|
|||
|
||||
import android.content.Context;
|
||||
import android.content.res.Resources;
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.v4.content.ContextCompat;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.core.content.ContextCompat;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package com.nutomic.syncthingandroid.views;
|
||||
|
||||
import android.content.Context;
|
||||
import android.support.v7.widget.AppCompatEditText;
|
||||
import androidx.appcompat.widget.AppCompatEditText;
|
||||
import android.util.AttributeSet;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.inputmethod.EditorInfo;
|
||||
|
|
|
@ -3,9 +3,9 @@ package com.nutomic.syncthingandroid.views;
|
|||
import android.app.AlertDialog;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.databinding.DataBindingUtil;
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.v4.content.ContextCompat;
|
||||
import androidx.databinding.DataBindingUtil;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.core.content.ContextCompat;
|
||||
import android.text.TextUtils;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package com.nutomic.syncthingandroid.views;
|
||||
|
||||
import android.content.Context;
|
||||
import android.support.v7.widget.RecyclerView;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
// import android.util.Log;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
|
|
|
@ -9,8 +9,8 @@ import android.net.wifi.WifiManager;
|
|||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.preference.MultiSelectListPreference;
|
||||
import android.support.v4.app.ActivityCompat;
|
||||
import android.support.v4.content.ContextCompat;
|
||||
import androidx.core.app.ActivityCompat;
|
||||
import androidx.core.content.ContextCompat;
|
||||
import android.util.AttributeSet;
|
||||
import android.util.Log;
|
||||
import android.widget.Toast;
|
||||
|
|
|
@ -171,7 +171,7 @@
|
|||
android:textAppearance="@style/TextAppearance.AppCompat.Caption" />
|
||||
</LinearLayout>
|
||||
|
||||
<android.support.v7.widget.SwitchCompat
|
||||
<androidx.appcompat.widget.SwitchCompat
|
||||
android:id="@+id/introducer"
|
||||
style="@style/Widget.Syncthing.TextView.Label.Details"
|
||||
android:layout_width="match_parent"
|
||||
|
@ -181,7 +181,7 @@
|
|||
android:drawableStart="@drawable/ic_phonelink_black_24dp_active"
|
||||
android:text="@string/introducer" />
|
||||
|
||||
<android.support.v7.widget.SwitchCompat
|
||||
<androidx.appcompat.widget.SwitchCompat
|
||||
android:id="@+id/devicePause"
|
||||
style="@style/Widget.Syncthing.TextView.Label.Details"
|
||||
android:layout_width="match_parent"
|
||||
|
@ -200,7 +200,7 @@
|
|||
android:orientation="vertical"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<android.support.v7.widget.SwitchCompat
|
||||
<androidx.appcompat.widget.SwitchCompat
|
||||
android:id="@+id/customSyncConditionsSwitch"
|
||||
style="@style/Widget.Syncthing.TextView.Label.Details"
|
||||
android:layout_width="match_parent"
|
||||
|
|
|
@ -120,7 +120,7 @@
|
|||
|
||||
</LinearLayout>
|
||||
|
||||
<android.support.v7.widget.SwitchCompat
|
||||
<androidx.appcompat.widget.SwitchCompat
|
||||
android:id="@+id/fileWatcher"
|
||||
style="@style/Widget.Syncthing.TextView.Label.Details"
|
||||
android:layout_width="match_parent"
|
||||
|
@ -141,7 +141,7 @@
|
|||
android:text="@string/folder_fileWatcherDescription"
|
||||
android:focusable="false"/>
|
||||
|
||||
<android.support.v7.widget.SwitchCompat
|
||||
<androidx.appcompat.widget.SwitchCompat
|
||||
android:id="@+id/folderPause"
|
||||
style="@style/Widget.Syncthing.TextView.Label.Details"
|
||||
android:layout_width="match_parent"
|
||||
|
@ -160,7 +160,7 @@
|
|||
android:orientation="vertical"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<android.support.v7.widget.SwitchCompat
|
||||
<androidx.appcompat.widget.SwitchCompat
|
||||
android:id="@+id/customSyncConditionsSwitch"
|
||||
style="@style/Widget.Syncthing.TextView.Label.Details"
|
||||
android:layout_width="match_parent"
|
||||
|
@ -291,7 +291,7 @@
|
|||
android:gravity="center_vertical"
|
||||
android:focusable="true">
|
||||
|
||||
<android.support.v7.widget.SwitchCompat
|
||||
<androidx.appcompat.widget.SwitchCompat
|
||||
android:id="@+id/ignoreDelete"
|
||||
style="@style/Widget.Syncthing.TextView.Label.Details"
|
||||
android:layout_width="match_parent"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<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"
|
||||
android:id="@+id/drawer_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
@ -11,7 +11,7 @@
|
|||
|
||||
<include layout="@layout/widget_toolbar" />
|
||||
|
||||
<android.support.design.widget.TabLayout
|
||||
<com.google.android.material.tabs.TabLayout
|
||||
android:id="@+id/tabContainer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
@ -19,7 +19,7 @@
|
|||
android:elevation="@dimen/toolbar_elevation"
|
||||
android:theme="@style/ThemeOverlay.Syncthing.Toolbar" />
|
||||
|
||||
<android.support.v4.view.ViewPager
|
||||
<androidx.viewpager.widget.ViewPager
|
||||
android:id="@+id/pager"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
@ -34,4 +34,4 @@
|
|||
android:clickable="true"
|
||||
android:elevation="16dp"
|
||||
android:focusable="true" />
|
||||
</android.support.v4.widget.DrawerLayout>
|
||||
</androidx.drawerlayout.widget.DrawerLayout>
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
android:focusable="false"
|
||||
android:text="@string/no_recent_changes" />
|
||||
|
||||
<android.support.v7.widget.RecyclerView
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/changes_recycler_view"
|
||||
android:contentDescription="@string/recent_changes_title"
|
||||
android:layout_width="match_parent"
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
|
||||
<include layout="@layout/widget_toolbar" />
|
||||
|
||||
<android.support.constraint.ConstraintLayout
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
|
@ -159,6 +159,6 @@
|
|||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/sub_directory_Textview" />
|
||||
|
||||
</android.support.constraint.ConstraintLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
|
|
|
@ -59,7 +59,7 @@
|
|||
android:orientation="vertical"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<android.support.v7.widget.SwitchCompat
|
||||
<androidx.appcompat.widget.SwitchCompat
|
||||
android:id="@+id/sync_on_wifi_title"
|
||||
style="@style/Widget.Syncthing.TextView.Label.Details"
|
||||
android:layout_width="match_parent"
|
||||
|
@ -90,7 +90,7 @@
|
|||
android:orientation="vertical"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<android.support.v7.widget.SwitchCompat
|
||||
<androidx.appcompat.widget.SwitchCompat
|
||||
android:id="@+id/sync_on_whitelisted_wifi_title"
|
||||
style="@style/Widget.Syncthing.TextView.Label.Details"
|
||||
android:layout_width="match_parent"
|
||||
|
@ -127,7 +127,7 @@
|
|||
android:orientation="vertical"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<android.support.v7.widget.SwitchCompat
|
||||
<androidx.appcompat.widget.SwitchCompat
|
||||
android:id="@+id/sync_on_metered_wifi_title"
|
||||
style="@style/Widget.Syncthing.TextView.Label.Details"
|
||||
android:layout_width="match_parent"
|
||||
|
@ -158,7 +158,7 @@
|
|||
android:orientation="vertical"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<android.support.v7.widget.SwitchCompat
|
||||
<androidx.appcompat.widget.SwitchCompat
|
||||
android:id="@+id/sync_on_mobile_data_title"
|
||||
style="@style/Widget.Syncthing.TextView.Label.Details"
|
||||
android:layout_width="match_parent"
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
<include layout="@layout/widget_toolbar" />
|
||||
|
||||
<android.support.v7.widget.RecyclerView
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/tip_recycler_view"
|
||||
android:contentDescription="@string/tips_and_tricks_title"
|
||||
android:layout_width="match_parent"
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<android.support.v7.widget.LinearLayoutCompat
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:id="@+id/bottomActions"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
@ -38,7 +38,7 @@
|
|||
android:clickable="true"
|
||||
android:focusable="true" />
|
||||
|
||||
</android.support.v7.widget.LinearLayoutCompat>
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
<ScrollView
|
||||
android:layout_width="match_parent"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<android.support.v7.widget.SwitchCompat xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<androidx.appcompat.widget.SwitchCompat xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
style="@style/Widget.Syncthing.TextView.Label.Details.DeviceList"
|
||||
android:id="@+id/device_toggle"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<android.support.v7.widget.SwitchCompat xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<androidx.appcompat.widget.SwitchCompat xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
style="@style/Widget.Syncthing.TextView.Label.Details.WifiSsidList"
|
||||
android:id="@+id/wifi_ssid_toggle"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<android.support.v7.widget.Toolbar
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/toolbar"
|
||||
|
@ -16,7 +16,7 @@
|
|||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<android.support.v7.widget.AppCompatRadioButton
|
||||
<androidx.appcompat.widget.AppCompatRadioButton
|
||||
android:id="@+id/btnActive"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
@ -26,7 +26,7 @@
|
|||
android:visibility="gone"
|
||||
app:buttonTint="#76ff03"/>
|
||||
|
||||
<android.support.v7.widget.AppCompatRadioButton
|
||||
<androidx.appcompat.widget.AppCompatRadioButton
|
||||
android:id="@+id/btnStarting"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
@ -36,7 +36,7 @@
|
|||
android:visibility="gone"
|
||||
app:buttonTint="#fff103"/>
|
||||
|
||||
<android.support.v7.widget.AppCompatRadioButton
|
||||
<androidx.appcompat.widget.AppCompatRadioButton
|
||||
android:id="@+id/btnDisabled"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
@ -48,4 +48,4 @@
|
|||
|
||||
</RelativeLayout>
|
||||
|
||||
</android.support.v7.widget.Toolbar>
|
||||
</androidx.appcompat.widget.Toolbar>
|
||||
|
|
|
@ -10,6 +10,6 @@
|
|||
<item
|
||||
android:id="@+id/menu_share"
|
||||
android:title="@string/share_title"
|
||||
app:actionProviderClass="android.support.v7.widget.ShareActionProvider" />
|
||||
app:actionProviderClass="androidx.appcompat.widget.ShareActionProvider" />
|
||||
|
||||
</menu>
|
||||
|
|
2
gradle.properties
Normal file
2
gradle.properties
Normal file
|
@ -0,0 +1,2 @@
|
|||
android.enableJetifier=true
|
||||
android.useAndroidX=true
|
Loading…
Reference in a new issue