diff --git a/AppFrame/build.gradle b/AppFrame/build.gradle index af486223..fbffc3a3 100644 --- a/AppFrame/build.gradle +++ b/AppFrame/build.gradle @@ -10,7 +10,7 @@ android { versionCode 1 versionName "1.0" - testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" + testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } buildTypes { release { @@ -25,11 +25,11 @@ android { dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) - androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', { + androidTestCompile('androidx.test.espresso:espresso-core:3.1.0', { exclude group: 'com.android.support', module: 'support-annotations' }) testCompile 'junit:junit:4.12' - api "com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}" + api 'androidx.appcompat:appcompat:1.0.2' api 'com.google.code.gson:gson:2.8.2' api 'io.reactivex:rxandroid:1.2.0' api 'io.reactivex:rxjava:1.1.5' @@ -39,10 +39,10 @@ dependencies { implementation 'com.squareup.retrofit2:converter-gson:2.1.0' implementation 'com.squareup.okhttp3:logging-interceptor:3.2.0' implementation 'com.github.franmontiel:PersistentCookieJar:v1.0.1' - implementation 'com.android.support:multidex:1.0.3' + implementation 'androidx.multidex:multidex:2.0.1' - api "android.arch.lifecycle:runtime:${rootProject.ext.lifecycleVersion}" - api "android.arch.lifecycle:extensions:${rootProject.ext.lifecycleVersion}" - annotationProcessor "android.arch.lifecycle:compiler:${rootProject.ext.lifecycleVersion}" + api 'androidx.lifecycle:lifecycle-runtime:2.0.0' + api 'androidx.lifecycle:lifecycle-extensions:2.0.0' + annotationProcessor 'androidx.lifecycle:lifecycle-compiler:2.0.0' } diff --git a/AppFrame/src/main/java/com/arialyy/frame/base/BaseDialog.java b/AppFrame/src/main/java/com/arialyy/frame/base/BaseDialog.java index 215a96c4..4e1340cc 100644 --- a/AppFrame/src/main/java/com/arialyy/frame/base/BaseDialog.java +++ b/AppFrame/src/main/java/com/arialyy/frame/base/BaseDialog.java @@ -6,13 +6,10 @@ import android.animation.AnimatorSet; import android.animation.IntEvaluator; import android.animation.ObjectAnimator; import android.animation.ValueAnimator; -import android.app.Dialog; -import android.databinding.ViewDataBinding; +import androidx.databinding.ViewDataBinding; import android.graphics.Color; import android.graphics.drawable.ColorDrawable; import android.os.Bundle; -import android.util.Log; -import android.view.View; import android.view.Window; import android.view.WindowManager; import android.view.animation.BounceInterpolator; diff --git a/AppFrame/src/main/java/com/arialyy/frame/base/BaseFragment.java b/AppFrame/src/main/java/com/arialyy/frame/base/BaseFragment.java index 26d53a24..2b06f5ae 100644 --- a/AppFrame/src/main/java/com/arialyy/frame/base/BaseFragment.java +++ b/AppFrame/src/main/java/com/arialyy/frame/base/BaseFragment.java @@ -1,6 +1,6 @@ package com.arialyy.frame.base; -import android.databinding.ViewDataBinding; +import androidx.databinding.ViewDataBinding; import com.arialyy.frame.core.AbsFragment; /** diff --git a/AppFrame/src/main/java/com/arialyy/frame/base/BaseViewModule.java b/AppFrame/src/main/java/com/arialyy/frame/base/BaseViewModule.java index 10523c88..0a16385f 100644 --- a/AppFrame/src/main/java/com/arialyy/frame/base/BaseViewModule.java +++ b/AppFrame/src/main/java/com/arialyy/frame/base/BaseViewModule.java @@ -1,6 +1,6 @@ package com.arialyy.frame.base; -import android.arch.lifecycle.ViewModel; +import androidx.lifecycle.ViewModel; import com.arialyy.frame.base.net.NetManager; import com.arialyy.frame.util.StringUtil; diff --git a/AppFrame/src/main/java/com/arialyy/frame/cache/AbsCache.java b/AppFrame/src/main/java/com/arialyy/frame/cache/AbsCache.java index 15ae613c..d026e71e 100644 --- a/AppFrame/src/main/java/com/arialyy/frame/cache/AbsCache.java +++ b/AppFrame/src/main/java/com/arialyy/frame/cache/AbsCache.java @@ -1,18 +1,15 @@ package com.arialyy.frame.cache; import android.content.Context; -import android.support.annotation.NonNull; -import android.support.v4.util.LruCache; import android.text.TextUtils; - +import androidx.annotation.NonNull; +import androidx.collection.LruCache; import com.arialyy.frame.util.AndroidUtils; import com.arialyy.frame.util.AppUtils; -import com.arialyy.frame.util.FileUtil; import com.arialyy.frame.util.StreamUtil; import com.arialyy.frame.util.StringUtil; import com.arialyy.frame.util.show.FL; import com.arialyy.frame.util.show.L; - import java.io.File; import java.io.IOException; import java.io.InputStream; diff --git a/AppFrame/src/main/java/com/arialyy/frame/cache/CacheUtil.java b/AppFrame/src/main/java/com/arialyy/frame/cache/CacheUtil.java index 5a1dad4b..41bd7911 100644 --- a/AppFrame/src/main/java/com/arialyy/frame/cache/CacheUtil.java +++ b/AppFrame/src/main/java/com/arialyy/frame/cache/CacheUtil.java @@ -2,12 +2,10 @@ package com.arialyy.frame.cache; import android.content.Context; import android.graphics.Bitmap; -import android.support.annotation.NonNull; - +import androidx.annotation.NonNull; import com.arialyy.frame.util.DrawableUtil; import com.arialyy.frame.util.show.L; import com.google.gson.Gson; - import java.io.UnsupportedEncodingException; /** diff --git a/AppFrame/src/main/java/com/arialyy/frame/core/AbsActivity.java b/AppFrame/src/main/java/com/arialyy/frame/core/AbsActivity.java index 19bb0d57..0077e96f 100644 --- a/AppFrame/src/main/java/com/arialyy/frame/core/AbsActivity.java +++ b/AppFrame/src/main/java/com/arialyy/frame/core/AbsActivity.java @@ -1,14 +1,13 @@ package com.arialyy.frame.core; import android.content.Intent; -import android.databinding.DataBindingUtil; -import android.databinding.ViewDataBinding; import android.os.Bundle; import android.os.Handler; -import android.support.annotation.NonNull; -import android.support.v7.app.AppCompatActivity; import android.view.View; - +import androidx.annotation.NonNull; +import androidx.appcompat.app.AppCompatActivity; +import androidx.databinding.DataBindingUtil; +import androidx.databinding.ViewDataBinding; import com.arialyy.frame.module.AbsModule; import com.arialyy.frame.module.IOCProxy; import com.arialyy.frame.temp.AbsTempView; diff --git a/AppFrame/src/main/java/com/arialyy/frame/core/AbsAlertDialog.java b/AppFrame/src/main/java/com/arialyy/frame/core/AbsAlertDialog.java index 34a5f2c0..31056a90 100644 --- a/AppFrame/src/main/java/com/arialyy/frame/core/AbsAlertDialog.java +++ b/AppFrame/src/main/java/com/arialyy/frame/core/AbsAlertDialog.java @@ -3,9 +3,8 @@ package com.arialyy.frame.core; import android.app.Dialog; import android.content.Intent; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.v4.app.DialogFragment; - +import androidx.annotation.NonNull; +import androidx.fragment.app.DialogFragment; import com.arialyy.frame.module.AbsModule; import com.arialyy.frame.module.IOCProxy; import com.arialyy.frame.util.StringUtil; diff --git a/AppFrame/src/main/java/com/arialyy/frame/core/AbsDialog.java b/AppFrame/src/main/java/com/arialyy/frame/core/AbsDialog.java index 583f03de..0e331133 100644 --- a/AppFrame/src/main/java/com/arialyy/frame/core/AbsDialog.java +++ b/AppFrame/src/main/java/com/arialyy/frame/core/AbsDialog.java @@ -2,9 +2,8 @@ package com.arialyy.frame.core; import android.app.Dialog; import android.content.Context; -import android.support.annotation.NonNull; import android.view.Window; - +import androidx.annotation.NonNull; import com.arialyy.frame.module.AbsModule; import com.arialyy.frame.module.IOCProxy; import com.arialyy.frame.util.StringUtil; diff --git a/AppFrame/src/main/java/com/arialyy/frame/core/AbsDialogFragment.java b/AppFrame/src/main/java/com/arialyy/frame/core/AbsDialogFragment.java index 58a97170..b94479d3 100644 --- a/AppFrame/src/main/java/com/arialyy/frame/core/AbsDialogFragment.java +++ b/AppFrame/src/main/java/com/arialyy/frame/core/AbsDialogFragment.java @@ -2,23 +2,21 @@ package com.arialyy.frame.core; import android.app.Activity; import android.content.Intent; -import android.databinding.DataBindingUtil; -import android.databinding.ViewDataBinding; import android.os.Bundle; -import android.support.annotation.IdRes; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v4.app.DialogFragment; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; - +import androidx.annotation.IdRes; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.databinding.DataBindingUtil; +import androidx.databinding.ViewDataBinding; +import androidx.fragment.app.DialogFragment; import com.arialyy.frame.module.AbsModule; import com.arialyy.frame.module.IOCProxy; import com.arialyy.frame.util.StringUtil; import com.lyy.frame.R; - /** * Created by lyy on 2015/11/4. * DialogFragment @@ -69,7 +67,7 @@ public abstract class AbsDialogFragment extends Dial } } - public T findViewById(@IdRes int id){ + public T findViewById(@IdRes int id) { return mRootView.findViewById(id); } diff --git a/AppFrame/src/main/java/com/arialyy/frame/core/AbsFragment.java b/AppFrame/src/main/java/com/arialyy/frame/core/AbsFragment.java index c44de757..73e00880 100644 --- a/AppFrame/src/main/java/com/arialyy/frame/core/AbsFragment.java +++ b/AppFrame/src/main/java/com/arialyy/frame/core/AbsFragment.java @@ -2,22 +2,21 @@ package com.arialyy.frame.core; import android.content.Context; import android.content.Intent; -import android.databinding.DataBindingUtil; -import android.databinding.ViewDataBinding; import android.os.Bundle; import android.os.Handler; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v4.app.Fragment; -import android.support.v4.app.FragmentContainer; -import android.support.v4.view.ViewPager; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.FrameLayout; import android.widget.LinearLayout; import android.widget.RelativeLayout; - +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.databinding.DataBindingUtil; +import androidx.databinding.ViewDataBinding; +import androidx.fragment.app.Fragment; +import androidx.fragment.app.FragmentContainer; +import androidx.viewpager.widget.ViewPager; import com.arialyy.frame.module.AbsModule; import com.arialyy.frame.module.IOCProxy; import com.arialyy.frame.temp.AbsTempView; @@ -26,7 +25,6 @@ import com.arialyy.frame.temp.TempView; import com.arialyy.frame.util.ReflectionUtil; import com.arialyy.frame.util.StringUtil; import com.arialyy.frame.util.show.L; - import java.lang.reflect.Field; /** diff --git a/AppFrame/src/main/java/com/arialyy/frame/core/AbsPopupWindow.java b/AppFrame/src/main/java/com/arialyy/frame/core/AbsPopupWindow.java index 053bc285..f41b739c 100644 --- a/AppFrame/src/main/java/com/arialyy/frame/core/AbsPopupWindow.java +++ b/AppFrame/src/main/java/com/arialyy/frame/core/AbsPopupWindow.java @@ -4,11 +4,11 @@ import android.content.Context; import android.graphics.Color; import android.graphics.drawable.ColorDrawable; import android.graphics.drawable.Drawable; -import android.support.annotation.NonNull; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.PopupWindow; +import androidx.annotation.NonNull; import com.arialyy.frame.module.AbsModule; import com.arialyy.frame.module.IOCProxy; import com.arialyy.frame.util.StringUtil; diff --git a/AppFrame/src/main/java/com/arialyy/frame/core/BindingFactory.java b/AppFrame/src/main/java/com/arialyy/frame/core/BindingFactory.java index 2b71abe4..25c0e6a8 100644 --- a/AppFrame/src/main/java/com/arialyy/frame/core/BindingFactory.java +++ b/AppFrame/src/main/java/com/arialyy/frame/core/BindingFactory.java @@ -1,6 +1,6 @@ package com.arialyy.frame.core; -import android.databinding.ViewDataBinding; +import androidx.databinding.ViewDataBinding; import java.util.HashMap; import java.util.Map; diff --git a/AppFrame/src/main/java/com/arialyy/frame/core/PermissionHelp.java b/AppFrame/src/main/java/com/arialyy/frame/core/PermissionHelp.java index c487333e..2e3b6cbd 100644 --- a/AppFrame/src/main/java/com/arialyy/frame/core/PermissionHelp.java +++ b/AppFrame/src/main/java/com/arialyy/frame/core/PermissionHelp.java @@ -4,8 +4,7 @@ import android.content.Context; import android.content.Intent; import android.content.pm.PackageManager; import android.provider.Settings; -import android.support.annotation.NonNull; - +import androidx.annotation.NonNull; import com.arialyy.frame.permission.OnPermissionCallback; import com.arialyy.frame.permission.PermissionManager; import com.arialyy.frame.util.AndroidVersionUtil; diff --git a/AppFrame/src/main/java/com/arialyy/frame/http/HttpUtil.java b/AppFrame/src/main/java/com/arialyy/frame/http/HttpUtil.java index 3f11c65f..c082bb2f 100644 --- a/AppFrame/src/main/java/com/arialyy/frame/http/HttpUtil.java +++ b/AppFrame/src/main/java/com/arialyy/frame/http/HttpUtil.java @@ -3,15 +3,12 @@ package com.arialyy.frame.http; import android.content.Context; import android.os.Handler; import android.os.Looper; -import android.support.annotation.NonNull; import android.text.TextUtils; - +import androidx.annotation.NonNull; import com.arialyy.frame.cache.CacheUtil; import com.arialyy.frame.http.inf.IResponse; import com.arialyy.frame.util.show.L; - import java.io.BufferedInputStream; -import java.io.BufferedReader; import java.io.DataOutputStream; import java.io.File; import java.io.FileInputStream; @@ -25,14 +22,12 @@ import java.util.Map; import java.util.Set; import java.util.UUID; import java.util.concurrent.TimeUnit; - import okhttp3.Call; import okhttp3.Callback; import okhttp3.FormBody; import okhttp3.Headers; import okhttp3.OkHttpClient; import okhttp3.Request; -import okhttp3.RequestBody; import okhttp3.Response; /** diff --git a/AppFrame/src/main/java/com/arialyy/frame/http/inf/IRequest.java b/AppFrame/src/main/java/com/arialyy/frame/http/inf/IRequest.java index 7dace3c5..782fa654 100644 --- a/AppFrame/src/main/java/com/arialyy/frame/http/inf/IRequest.java +++ b/AppFrame/src/main/java/com/arialyy/frame/http/inf/IRequest.java @@ -1,6 +1,6 @@ package com.arialyy.frame.http.inf; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; /** * 网络请求类 diff --git a/AppFrame/src/main/java/com/arialyy/frame/module/AbsModule.java b/AppFrame/src/main/java/com/arialyy/frame/module/AbsModule.java index 2c0e6d07..521734b3 100644 --- a/AppFrame/src/main/java/com/arialyy/frame/module/AbsModule.java +++ b/AppFrame/src/main/java/com/arialyy/frame/module/AbsModule.java @@ -1,23 +1,14 @@ package com.arialyy.frame.module; import android.content.Context; -import android.databinding.ViewDataBinding; -import android.text.TextUtils; -import android.util.SparseIntArray; -import android.view.View; +import androidx.databinding.ViewDataBinding; import com.arialyy.frame.core.AbsActivity; import com.arialyy.frame.core.BindingFactory; import com.arialyy.frame.module.inf.ModuleListener; -import com.arialyy.frame.util.ObjUtil; import com.arialyy.frame.util.StringUtil; import com.arialyy.frame.util.show.L; -import java.util.HashMap; -import java.util.HashSet; -import java.util.Map; -import java.util.Set; - /** * Created by AriaLyy on 2015/2/3. * 抽象的module diff --git a/AppFrame/src/main/java/com/arialyy/frame/permission/PermissionManager.java b/AppFrame/src/main/java/com/arialyy/frame/permission/PermissionManager.java index c85ae01a..a1d4d1c6 100644 --- a/AppFrame/src/main/java/com/arialyy/frame/permission/PermissionManager.java +++ b/AppFrame/src/main/java/com/arialyy/frame/permission/PermissionManager.java @@ -4,11 +4,9 @@ import android.annotation.TargetApi; import android.app.Activity; import android.os.Build; import android.provider.Settings; -import android.support.v4.app.Fragment; import android.util.SparseArray; -import com.arialyy.frame.util.show.L; - +import androidx.fragment.app.Fragment; import java.util.Arrays; import java.util.List; diff --git a/AppFrame/src/main/java/com/arialyy/frame/permission/PermissionUtil.java b/AppFrame/src/main/java/com/arialyy/frame/permission/PermissionUtil.java index 19857cd3..8534cdfd 100644 --- a/AppFrame/src/main/java/com/arialyy/frame/permission/PermissionUtil.java +++ b/AppFrame/src/main/java/com/arialyy/frame/permission/PermissionUtil.java @@ -7,13 +7,11 @@ import android.content.pm.PackageManager; import android.net.Uri; import android.os.Build; import android.provider.Settings; -import android.support.v4.app.Fragment; import android.text.TextUtils; - +import androidx.fragment.app.Fragment; import com.arialyy.frame.util.AndroidVersionUtil; import com.arialyy.frame.util.show.L; import com.arialyy.frame.util.show.T; - import java.util.ArrayList; import java.util.List; diff --git a/AppFrame/src/main/java/com/arialyy/frame/temp/AbsTempView.java b/AppFrame/src/main/java/com/arialyy/frame/temp/AbsTempView.java index 52745a60..68e86110 100644 --- a/AppFrame/src/main/java/com/arialyy/frame/temp/AbsTempView.java +++ b/AppFrame/src/main/java/com/arialyy/frame/temp/AbsTempView.java @@ -1,12 +1,11 @@ package com.arialyy.frame.temp; import android.content.Context; -import android.support.annotation.NonNull; import android.util.AttributeSet; import android.view.LayoutInflater; import android.view.View; import android.widget.LinearLayout; - +import androidx.annotation.NonNull; import com.arialyy.frame.util.StringUtil; import com.arialyy.frame.util.show.L; diff --git a/AppFrame/src/main/java/com/arialyy/frame/util/AESEncryption.java b/AppFrame/src/main/java/com/arialyy/frame/util/AESEncryption.java index 182aa69f..6a6da25d 100644 --- a/AppFrame/src/main/java/com/arialyy/frame/util/AESEncryption.java +++ b/AppFrame/src/main/java/com/arialyy/frame/util/AESEncryption.java @@ -1,11 +1,9 @@ package com.arialyy.frame.util; import android.annotation.SuppressLint; -import android.support.annotation.NonNull; - +import androidx.annotation.NonNull; import java.io.File; import java.security.SecureRandom; - import javax.crypto.Cipher; import javax.crypto.KeyGenerator; import javax.crypto.SecretKey; diff --git a/AppFrame/src/main/java/com/arialyy/frame/util/AndroidUtils.java b/AppFrame/src/main/java/com/arialyy/frame/util/AndroidUtils.java index 03333054..2b5bef59 100644 --- a/AppFrame/src/main/java/com/arialyy/frame/util/AndroidUtils.java +++ b/AppFrame/src/main/java/com/arialyy/frame/util/AndroidUtils.java @@ -17,8 +17,8 @@ import android.os.Bundle; import android.os.Environment; import android.os.StatFs; import android.provider.Settings; -import android.support.annotation.NonNull; -import android.support.v4.content.FileProvider; +import androidx.annotation.NonNull; +import androidx.core.content.FileProvider; import android.telephony.TelephonyManager; import android.util.DisplayMetrics; import android.view.WindowManager; diff --git a/AppFrame/src/main/java/com/arialyy/frame/util/FileUtil.java b/AppFrame/src/main/java/com/arialyy/frame/util/FileUtil.java index f0db1066..19598889 100644 --- a/AppFrame/src/main/java/com/arialyy/frame/util/FileUtil.java +++ b/AppFrame/src/main/java/com/arialyy/frame/util/FileUtil.java @@ -6,12 +6,10 @@ import android.content.pm.ApplicationInfo; import android.content.pm.PackageInfo; import android.content.pm.PackageManager; import android.graphics.Bitmap; -import android.graphics.BitmapFactory; import android.graphics.drawable.Drawable; -import android.media.MediaMetadataRetriever; import android.net.Uri; -import android.support.annotation.NonNull; import android.text.TextUtils; +import androidx.annotation.NonNull; import com.arialyy.frame.util.show.FL; import com.arialyy.frame.util.show.L; import java.io.BufferedInputStream; @@ -31,8 +29,6 @@ import java.math.BigInteger; import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; import java.util.Enumeration; -import java.util.Formatter; -import java.util.Locale; import java.util.zip.ZipEntry; import java.util.zip.ZipFile; diff --git a/Aria/build.gradle b/Aria/build.gradle index fb212e7b..ca7841a2 100644 --- a/Aria/build.gradle +++ b/Aria/build.gradle @@ -24,7 +24,7 @@ android { dependencies { implementation fileTree(include: ['*.jar'], dir: 'libs') testImplementation 'junit:junit:4.12' - implementation "com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}" + implementation 'androidx.appcompat:appcompat:1.0.0' api project(':AriaAnnotations') api 'com.arialyy.aria:aria-ftp-plug:1.0.4' // 打包时用这个 diff --git a/Aria/src/main/java/com/arialyy/aria/core/Aria.java b/Aria/src/main/java/com/arialyy/aria/core/Aria.java index efdbce23..d18f76a0 100644 --- a/Aria/src/main/java/com/arialyy/aria/core/Aria.java +++ b/Aria/src/main/java/com/arialyy/aria/core/Aria.java @@ -23,9 +23,9 @@ import android.app.Dialog; import android.app.Service; import android.content.Context; import android.os.Build; -import android.support.v4.app.DialogFragment; -import android.support.v4.app.Fragment; import android.widget.PopupWindow; +import androidx.fragment.app.DialogFragment; +import androidx.fragment.app.Fragment; import com.arialyy.aria.core.download.DownloadReceiver; import com.arialyy.aria.core.upload.UploadReceiver; import com.arialyy.aria.util.ALog; @@ -86,8 +86,8 @@ import com.arialyy.aria.util.ALog; * @param obj 观察者对象,为本类对象,使用{@code this} */ public static DownloadReceiver download(Object obj) { - if (AriaManager.getInstance() != null){ - return AriaManager.getInstance().download(obj); + if (AriaManager.getInstance() != null) { + return AriaManager.getInstance().download(obj); } return get(convertContext(obj)).download(obj); } @@ -100,7 +100,7 @@ import com.arialyy.aria.util.ALog; * @param obj 观察者对象,为本类对象,使用{@code this} */ public static UploadReceiver upload(Object obj) { - if (AriaManager.getInstance() != null){ + if (AriaManager.getInstance() != null) { return AriaManager.getInstance().upload(obj); } return get(convertContext(obj)).upload(obj); @@ -111,9 +111,10 @@ import com.arialyy.aria.util.ALog; */ public static AriaManager get(Context context) { if (context == null) { - throw new NullPointerException("context 无效,在非【Activity、Service、Application、DialogFragment、Fragment、PopupWindow、Dialog】," - + "请参考【https://aria.laoyuyu.me/aria_doc/start/any_java.html】,参数请使用 download(this) 或 upload(this);" - + "不要使用 download(getContext()) 或 upload(getContext())"); + throw new NullPointerException( + "context 无效,在非【Activity、Service、Application、DialogFragment、Fragment、PopupWindow、Dialog】," + + "请参考【https://aria.laoyuyu.me/aria_doc/start/any_java.html】,参数请使用 download(this) 或 upload(this);" + + "不要使用 download(getContext()) 或 upload(getContext())"); } return AriaManager.getInstance(context); } @@ -139,7 +140,7 @@ import com.arialyy.aria.util.ALog; return ((DialogFragment) obj).getContext(); } else if (obj instanceof android.app.DialogFragment) { return ((android.app.DialogFragment) obj).getActivity(); - } else if (obj instanceof android.support.v4.app.Fragment) { + } else if (obj instanceof Fragment) { return ((Fragment) obj).getContext(); } else if (obj instanceof android.app.Fragment) { return ((android.app.Fragment) obj).getActivity(); diff --git a/Aria/src/main/java/com/arialyy/aria/core/AriaManager.java b/Aria/src/main/java/com/arialyy/aria/core/AriaManager.java index d99589ff..d299ffb4 100644 --- a/Aria/src/main/java/com/arialyy/aria/core/AriaManager.java +++ b/Aria/src/main/java/com/arialyy/aria/core/AriaManager.java @@ -29,9 +29,9 @@ import android.os.Build; import android.os.Bundle; import android.os.Handler; import android.os.Looper; -import android.support.v4.app.DialogFragment; -import android.support.v4.app.Fragment; import android.widget.PopupWindow; +import androidx.fragment.app.DialogFragment; +import androidx.fragment.app.Fragment; import com.arialyy.aria.core.command.CommandManager; import com.arialyy.aria.core.common.QueueMod; import com.arialyy.aria.core.common.RecordHandler; @@ -385,7 +385,7 @@ import org.xml.sax.SAXException; relateSubClass(type, obj, ((DialogFragment) obj).getActivity()); } else if (obj instanceof android.app.DialogFragment) { relateSubClass(type, obj, ((android.app.DialogFragment) obj).getActivity()); - } else if (obj instanceof android.support.v4.app.Fragment) { + } else if (obj instanceof Fragment) { relateSubClass(type, obj, ((Fragment) obj).getActivity()); } else if (obj instanceof android.app.Fragment) { relateSubClass(type, obj, ((android.app.Fragment) obj).getActivity()); diff --git a/Aria/src/main/java/com/arialyy/aria/core/WidgetLiftManager.java b/Aria/src/main/java/com/arialyy/aria/core/WidgetLiftManager.java index d115084c..a1f7c1e6 100644 --- a/Aria/src/main/java/com/arialyy/aria/core/WidgetLiftManager.java +++ b/Aria/src/main/java/com/arialyy/aria/core/WidgetLiftManager.java @@ -20,8 +20,8 @@ import android.app.Dialog; import android.content.DialogInterface; import android.os.Build; import android.os.Message; -import android.support.v4.app.DialogFragment; import android.widget.PopupWindow; +import androidx.fragment.app.DialogFragment; import com.arialyy.aria.util.ALog; import com.arialyy.aria.util.CommonUtil; import java.lang.reflect.Field; @@ -46,7 +46,7 @@ final class WidgetLiftManager { /** * 处理DialogFragment事件 * - * @param dialogFragment {@link android.support.v4.app.DialogFragment} + * @param dialogFragment {@link DialogFragment} */ @TargetApi(Build.VERSION_CODES.HONEYCOMB) boolean handleDialogFragmentLift( DialogFragment dialogFragment) { diff --git a/Aria/src/main/java/com/arialyy/aria/core/common/AbsThreadTask.java b/Aria/src/main/java/com/arialyy/aria/core/common/AbsThreadTask.java index b9138926..ecb14c21 100644 --- a/Aria/src/main/java/com/arialyy/aria/core/common/AbsThreadTask.java +++ b/Aria/src/main/java/com/arialyy/aria/core/common/AbsThreadTask.java @@ -20,7 +20,7 @@ import android.os.Bundle; import android.os.Handler; import android.os.Message; import android.os.Process; -import android.support.annotation.Nullable; +import androidx.annotation.Nullable; import com.arialyy.aria.core.AriaManager; import com.arialyy.aria.core.config.BaseTaskConfig; import com.arialyy.aria.core.config.DGroupConfig; diff --git a/Aria/src/main/java/com/arialyy/aria/core/common/BaseDelegate.java b/Aria/src/main/java/com/arialyy/aria/core/common/BaseDelegate.java index 0d4048a0..f9f7af92 100644 --- a/Aria/src/main/java/com/arialyy/aria/core/common/BaseDelegate.java +++ b/Aria/src/main/java/com/arialyy/aria/core/common/BaseDelegate.java @@ -15,7 +15,7 @@ */ package com.arialyy.aria.core.common; -import android.support.annotation.CheckResult; +import androidx.annotation.CheckResult; import com.arialyy.aria.core.common.controller.ControllerType; import com.arialyy.aria.core.common.controller.FeatureController; import com.arialyy.aria.core.inf.AbsTarget; diff --git a/Aria/src/main/java/com/arialyy/aria/core/common/ProtocolType.java b/Aria/src/main/java/com/arialyy/aria/core/common/ProtocolType.java index 8a80e123..829489a9 100644 --- a/Aria/src/main/java/com/arialyy/aria/core/common/ProtocolType.java +++ b/Aria/src/main/java/com/arialyy/aria/core/common/ProtocolType.java @@ -15,7 +15,7 @@ */ package com.arialyy.aria.core.common; -import android.support.annotation.StringDef; +import androidx.annotation.StringDef; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; diff --git a/Aria/src/main/java/com/arialyy/aria/core/common/ftp/FTPSDelegate.java b/Aria/src/main/java/com/arialyy/aria/core/common/ftp/FTPSDelegate.java index ff0ed878..e5d0cd4e 100644 --- a/Aria/src/main/java/com/arialyy/aria/core/common/ftp/FTPSDelegate.java +++ b/Aria/src/main/java/com/arialyy/aria/core/common/ftp/FTPSDelegate.java @@ -15,8 +15,8 @@ */ package com.arialyy.aria.core.common.ftp; -import android.support.annotation.CheckResult; import android.text.TextUtils; +import androidx.annotation.CheckResult; import com.arialyy.aria.core.FtpUrlEntity; import com.arialyy.aria.core.common.BaseDelegate; import com.arialyy.aria.core.common.ProtocolType; diff --git a/Aria/src/main/java/com/arialyy/aria/core/common/ftp/FtpDelegate.java b/Aria/src/main/java/com/arialyy/aria/core/common/ftp/FtpDelegate.java index 01a1086d..1d93b409 100644 --- a/Aria/src/main/java/com/arialyy/aria/core/common/ftp/FtpDelegate.java +++ b/Aria/src/main/java/com/arialyy/aria/core/common/ftp/FtpDelegate.java @@ -15,7 +15,7 @@ */ package com.arialyy.aria.core.common.ftp; -import android.support.annotation.CheckResult; +import androidx.annotation.CheckResult; import android.text.TextUtils; import com.arialyy.aria.core.FtpUrlEntity; import com.arialyy.aria.core.common.BaseDelegate; diff --git a/Aria/src/main/java/com/arialyy/aria/core/common/http/HttpDelegate.java b/Aria/src/main/java/com/arialyy/aria/core/common/http/HttpDelegate.java index 42ef87e0..f9ff08a1 100644 --- a/Aria/src/main/java/com/arialyy/aria/core/common/http/HttpDelegate.java +++ b/Aria/src/main/java/com/arialyy/aria/core/common/http/HttpDelegate.java @@ -15,9 +15,9 @@ */ package com.arialyy.aria.core.common.http; -import android.support.annotation.CheckResult; -import android.support.annotation.NonNull; import android.text.TextUtils; +import androidx.annotation.CheckResult; +import androidx.annotation.NonNull; import com.arialyy.aria.core.common.BaseDelegate; import com.arialyy.aria.core.common.RequestEnum; import com.arialyy.aria.core.common.Suggest; diff --git a/Aria/src/main/java/com/arialyy/aria/core/config/ConfigType.java b/Aria/src/main/java/com/arialyy/aria/core/config/ConfigType.java index 458dbf50..357c485d 100644 --- a/Aria/src/main/java/com/arialyy/aria/core/config/ConfigType.java +++ b/Aria/src/main/java/com/arialyy/aria/core/config/ConfigType.java @@ -15,7 +15,7 @@ */ package com.arialyy.aria.core.config; -import android.support.annotation.IntDef; +import androidx.annotation.IntDef; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; diff --git a/Aria/src/main/java/com/arialyy/aria/core/download/AbsGroupConfigHandler.java b/Aria/src/main/java/com/arialyy/aria/core/download/AbsGroupConfigHandler.java index f8eee7f8..669d90fb 100644 --- a/Aria/src/main/java/com/arialyy/aria/core/download/AbsGroupConfigHandler.java +++ b/Aria/src/main/java/com/arialyy/aria/core/download/AbsGroupConfigHandler.java @@ -15,7 +15,7 @@ */ package com.arialyy.aria.core.download; -import android.support.annotation.CheckResult; +import androidx.annotation.CheckResult; import android.text.TextUtils; import com.arialyy.aria.core.event.ErrorEvent; import com.arialyy.aria.core.inf.AbsTarget; diff --git a/Aria/src/main/java/com/arialyy/aria/core/download/DownloadReceiver.java b/Aria/src/main/java/com/arialyy/aria/core/download/DownloadReceiver.java index f66b700c..15659cf7 100644 --- a/Aria/src/main/java/com/arialyy/aria/core/download/DownloadReceiver.java +++ b/Aria/src/main/java/com/arialyy/aria/core/download/DownloadReceiver.java @@ -15,9 +15,9 @@ */ package com.arialyy.aria.core.download; -import android.support.annotation.CheckResult; -import android.support.annotation.NonNull; import android.text.TextUtils; +import androidx.annotation.CheckResult; +import androidx.annotation.NonNull; import com.arialyy.annotations.TaskEnum; import com.arialyy.aria.core.AriaManager; import com.arialyy.aria.core.command.CancelAllCmd; diff --git a/Aria/src/main/java/com/arialyy/aria/core/download/FtpDirNormalTarget.java b/Aria/src/main/java/com/arialyy/aria/core/download/FtpDirNormalTarget.java index cabcea4b..37ff276a 100644 --- a/Aria/src/main/java/com/arialyy/aria/core/download/FtpDirNormalTarget.java +++ b/Aria/src/main/java/com/arialyy/aria/core/download/FtpDirNormalTarget.java @@ -15,7 +15,7 @@ */ package com.arialyy.aria.core.download; -import android.support.annotation.CheckResult; +import androidx.annotation.CheckResult; import com.arialyy.aria.core.common.AbsNormalTarget; import com.arialyy.aria.core.common.Suggest; import com.arialyy.aria.core.common.ftp.FtpDelegate; diff --git a/Aria/src/main/java/com/arialyy/aria/core/download/FtpDirStartTarget.java b/Aria/src/main/java/com/arialyy/aria/core/download/FtpDirStartTarget.java index 268ccec3..9d65e2b0 100644 --- a/Aria/src/main/java/com/arialyy/aria/core/download/FtpDirStartTarget.java +++ b/Aria/src/main/java/com/arialyy/aria/core/download/FtpDirStartTarget.java @@ -15,7 +15,7 @@ */ package com.arialyy.aria.core.download; -import android.support.annotation.CheckResult; +import androidx.annotation.CheckResult; import com.arialyy.aria.core.common.AbsStartTarget; import com.arialyy.aria.core.common.Suggest; import com.arialyy.aria.core.common.ftp.FtpDelegate; diff --git a/Aria/src/main/java/com/arialyy/aria/core/download/FtpNormalTarget.java b/Aria/src/main/java/com/arialyy/aria/core/download/FtpNormalTarget.java index 291ffd2b..067c1f29 100644 --- a/Aria/src/main/java/com/arialyy/aria/core/download/FtpNormalTarget.java +++ b/Aria/src/main/java/com/arialyy/aria/core/download/FtpNormalTarget.java @@ -15,8 +15,8 @@ */ package com.arialyy.aria.core.download; -import android.support.annotation.CheckResult; -import android.support.annotation.NonNull; +import androidx.annotation.CheckResult; +import androidx.annotation.NonNull; import com.arialyy.aria.core.common.AbsNormalTarget; import com.arialyy.aria.core.common.Suggest; import com.arialyy.aria.core.common.ftp.FtpDelegate; diff --git a/Aria/src/main/java/com/arialyy/aria/core/download/FtpStartTarget.java b/Aria/src/main/java/com/arialyy/aria/core/download/FtpStartTarget.java index cad74ed1..a2b8813e 100644 --- a/Aria/src/main/java/com/arialyy/aria/core/download/FtpStartTarget.java +++ b/Aria/src/main/java/com/arialyy/aria/core/download/FtpStartTarget.java @@ -15,12 +15,11 @@ */ package com.arialyy.aria.core.download; -import android.support.annotation.CheckResult; -import android.support.annotation.NonNull; +import androidx.annotation.CheckResult; +import androidx.annotation.NonNull; import com.arialyy.aria.core.common.AbsStartTarget; import com.arialyy.aria.core.common.Suggest; import com.arialyy.aria.core.common.ftp.FtpDelegate; -import com.arialyy.aria.core.inf.AbsTaskWrapper; import com.arialyy.aria.core.inf.ITaskWrapper; import com.arialyy.aria.util.CommonUtil; diff --git a/Aria/src/main/java/com/arialyy/aria/core/download/GroupNormalTarget.java b/Aria/src/main/java/com/arialyy/aria/core/download/GroupNormalTarget.java index a227f7ce..a844f27b 100644 --- a/Aria/src/main/java/com/arialyy/aria/core/download/GroupNormalTarget.java +++ b/Aria/src/main/java/com/arialyy/aria/core/download/GroupNormalTarget.java @@ -15,7 +15,7 @@ */ package com.arialyy.aria.core.download; -import android.support.annotation.CheckResult; +import androidx.annotation.CheckResult; import com.arialyy.aria.core.common.AbsNormalTarget; import com.arialyy.aria.core.common.Suggest; import com.arialyy.aria.core.common.http.HttpDelegate; diff --git a/Aria/src/main/java/com/arialyy/aria/core/download/GroupStartTarget.java b/Aria/src/main/java/com/arialyy/aria/core/download/GroupStartTarget.java index 55a32d86..9c71102c 100644 --- a/Aria/src/main/java/com/arialyy/aria/core/download/GroupStartTarget.java +++ b/Aria/src/main/java/com/arialyy/aria/core/download/GroupStartTarget.java @@ -15,7 +15,7 @@ */ package com.arialyy.aria.core.download; -import android.support.annotation.CheckResult; +import androidx.annotation.CheckResult; import com.arialyy.aria.core.common.AbsStartTarget; import com.arialyy.aria.core.common.Suggest; import com.arialyy.aria.core.common.http.HttpDelegate; diff --git a/Aria/src/main/java/com/arialyy/aria/core/download/HttpGroupConfigHandler.java b/Aria/src/main/java/com/arialyy/aria/core/download/HttpGroupConfigHandler.java index 01067365..a633e467 100644 --- a/Aria/src/main/java/com/arialyy/aria/core/download/HttpGroupConfigHandler.java +++ b/Aria/src/main/java/com/arialyy/aria/core/download/HttpGroupConfigHandler.java @@ -15,7 +15,7 @@ */ package com.arialyy.aria.core.download; -import android.support.annotation.CheckResult; +import androidx.annotation.CheckResult; import com.arialyy.aria.core.inf.AbsTarget; import com.arialyy.aria.orm.DbEntity; import com.arialyy.aria.util.ALog; diff --git a/Aria/src/main/java/com/arialyy/aria/core/download/HttpNormalTarget.java b/Aria/src/main/java/com/arialyy/aria/core/download/HttpNormalTarget.java index 2ed1cfc8..41926549 100644 --- a/Aria/src/main/java/com/arialyy/aria/core/download/HttpNormalTarget.java +++ b/Aria/src/main/java/com/arialyy/aria/core/download/HttpNormalTarget.java @@ -15,7 +15,7 @@ */ package com.arialyy.aria.core.download; -import android.support.annotation.CheckResult; +import androidx.annotation.CheckResult; import com.arialyy.aria.core.common.AbsNormalTarget; import com.arialyy.aria.core.common.Suggest; import com.arialyy.aria.core.common.http.HttpDelegate; diff --git a/Aria/src/main/java/com/arialyy/aria/core/download/HttpStartTarget.java b/Aria/src/main/java/com/arialyy/aria/core/download/HttpStartTarget.java index 6807942c..0ac74b1c 100644 --- a/Aria/src/main/java/com/arialyy/aria/core/download/HttpStartTarget.java +++ b/Aria/src/main/java/com/arialyy/aria/core/download/HttpStartTarget.java @@ -15,8 +15,8 @@ */ package com.arialyy.aria.core.download; -import android.support.annotation.CheckResult; -import android.support.annotation.NonNull; +import androidx.annotation.CheckResult; +import androidx.annotation.NonNull; import com.arialyy.aria.core.common.AbsStartTarget; import com.arialyy.aria.core.common.Suggest; import com.arialyy.aria.core.common.http.HttpDelegate; diff --git a/Aria/src/main/java/com/arialyy/aria/core/download/m3u8/ITsMergeHandler.java b/Aria/src/main/java/com/arialyy/aria/core/download/m3u8/ITsMergeHandler.java index cfc5633b..2b8359a0 100644 --- a/Aria/src/main/java/com/arialyy/aria/core/download/m3u8/ITsMergeHandler.java +++ b/Aria/src/main/java/com/arialyy/aria/core/download/m3u8/ITsMergeHandler.java @@ -15,7 +15,7 @@ */ package com.arialyy.aria.core.download.m3u8; -import android.support.annotation.Nullable; +import androidx.annotation.Nullable; import java.util.List; /** diff --git a/Aria/src/main/java/com/arialyy/aria/core/download/m3u8/M3U8Delegate.java b/Aria/src/main/java/com/arialyy/aria/core/download/m3u8/M3U8Delegate.java index 567931d4..5f6c70bd 100644 --- a/Aria/src/main/java/com/arialyy/aria/core/download/m3u8/M3U8Delegate.java +++ b/Aria/src/main/java/com/arialyy/aria/core/download/m3u8/M3U8Delegate.java @@ -15,7 +15,7 @@ */ package com.arialyy.aria.core.download.m3u8; -import android.support.annotation.CheckResult; +import androidx.annotation.CheckResult; import com.arialyy.aria.core.common.BaseDelegate; import com.arialyy.aria.core.common.Suggest; import com.arialyy.aria.core.download.DTaskWrapper; diff --git a/Aria/src/main/java/com/arialyy/aria/core/download/m3u8/M3U8LiveDelegate.java b/Aria/src/main/java/com/arialyy/aria/core/download/m3u8/M3U8LiveDelegate.java index d86fac27..edf7cf36 100644 --- a/Aria/src/main/java/com/arialyy/aria/core/download/m3u8/M3U8LiveDelegate.java +++ b/Aria/src/main/java/com/arialyy/aria/core/download/m3u8/M3U8LiveDelegate.java @@ -15,7 +15,7 @@ */ package com.arialyy.aria.core.download.m3u8; -import android.support.annotation.CheckResult; +import androidx.annotation.CheckResult; import com.arialyy.aria.core.common.BaseDelegate; import com.arialyy.aria.core.common.Suggest; import com.arialyy.aria.core.download.DTaskWrapper; diff --git a/Aria/src/main/java/com/arialyy/aria/core/download/m3u8/M3U8VodDelegate.java b/Aria/src/main/java/com/arialyy/aria/core/download/m3u8/M3U8VodDelegate.java index 83528b5f..deaf23f7 100644 --- a/Aria/src/main/java/com/arialyy/aria/core/download/m3u8/M3U8VodDelegate.java +++ b/Aria/src/main/java/com/arialyy/aria/core/download/m3u8/M3U8VodDelegate.java @@ -15,7 +15,7 @@ */ package com.arialyy.aria.core.download.m3u8; -import android.support.annotation.CheckResult; +import androidx.annotation.CheckResult; import com.arialyy.aria.core.common.BaseDelegate; import com.arialyy.aria.core.common.Suggest; import com.arialyy.aria.core.download.DTaskWrapper; diff --git a/Aria/src/main/java/com/arialyy/aria/core/inf/AbsTarget.java b/Aria/src/main/java/com/arialyy/aria/core/inf/AbsTarget.java index 52f7bacd..56729989 100644 --- a/Aria/src/main/java/com/arialyy/aria/core/inf/AbsTarget.java +++ b/Aria/src/main/java/com/arialyy/aria/core/inf/AbsTarget.java @@ -15,8 +15,8 @@ */ package com.arialyy.aria.core.inf; -import android.support.annotation.CheckResult; import android.text.TextUtils; +import androidx.annotation.CheckResult; import com.arialyy.aria.core.common.Suggest; import com.arialyy.aria.core.common.controller.NormalController; import com.arialyy.aria.core.common.controller.StartController; diff --git a/Aria/src/main/java/com/arialyy/aria/core/inf/ReceiverType.java b/Aria/src/main/java/com/arialyy/aria/core/inf/ReceiverType.java index f18d7dd3..cf4aa2be 100644 --- a/Aria/src/main/java/com/arialyy/aria/core/inf/ReceiverType.java +++ b/Aria/src/main/java/com/arialyy/aria/core/inf/ReceiverType.java @@ -15,7 +15,7 @@ */ package com.arialyy.aria.core.inf; -import android.support.annotation.StringDef; +import androidx.annotation.StringDef; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; diff --git a/Aria/src/main/java/com/arialyy/aria/core/inf/TaskSchedulerType.java b/Aria/src/main/java/com/arialyy/aria/core/inf/TaskSchedulerType.java index e6f81599..77e1dfbf 100644 --- a/Aria/src/main/java/com/arialyy/aria/core/inf/TaskSchedulerType.java +++ b/Aria/src/main/java/com/arialyy/aria/core/inf/TaskSchedulerType.java @@ -1,6 +1,6 @@ package com.arialyy.aria.core.inf; -import android.support.annotation.IntDef; +import androidx.annotation.IntDef; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; diff --git a/Aria/src/main/java/com/arialyy/aria/core/manager/TaskWrapperManager.java b/Aria/src/main/java/com/arialyy/aria/core/manager/TaskWrapperManager.java index 239c86bf..30043b7a 100644 --- a/Aria/src/main/java/com/arialyy/aria/core/manager/TaskWrapperManager.java +++ b/Aria/src/main/java/com/arialyy/aria/core/manager/TaskWrapperManager.java @@ -15,7 +15,7 @@ */ package com.arialyy.aria.core.manager; -import android.support.v4.util.LruCache; +import androidx.collection.LruCache; import com.arialyy.aria.core.download.DGTaskWrapper; import com.arialyy.aria.core.download.DTaskWrapper; import com.arialyy.aria.core.inf.AbsTaskWrapper; diff --git a/Aria/src/main/java/com/arialyy/aria/core/upload/FtpNormalTarget.java b/Aria/src/main/java/com/arialyy/aria/core/upload/FtpNormalTarget.java index f7c9c24f..8f0a8d6a 100644 --- a/Aria/src/main/java/com/arialyy/aria/core/upload/FtpNormalTarget.java +++ b/Aria/src/main/java/com/arialyy/aria/core/upload/FtpNormalTarget.java @@ -15,7 +15,7 @@ */ package com.arialyy.aria.core.upload; -import android.support.annotation.CheckResult; +import androidx.annotation.CheckResult; import com.arialyy.aria.core.common.AbsNormalTarget; import com.arialyy.aria.core.common.Suggest; import com.arialyy.aria.core.common.ftp.FtpDelegate; diff --git a/Aria/src/main/java/com/arialyy/aria/core/upload/FtpStartTarget.java b/Aria/src/main/java/com/arialyy/aria/core/upload/FtpStartTarget.java index 8214dbc0..721858c0 100644 --- a/Aria/src/main/java/com/arialyy/aria/core/upload/FtpStartTarget.java +++ b/Aria/src/main/java/com/arialyy/aria/core/upload/FtpStartTarget.java @@ -15,8 +15,8 @@ */ package com.arialyy.aria.core.upload; -import android.support.annotation.CheckResult; -import android.support.annotation.NonNull; +import androidx.annotation.CheckResult; +import androidx.annotation.NonNull; import com.arialyy.aria.core.common.AbsStartTarget; import com.arialyy.aria.core.common.Suggest; import com.arialyy.aria.core.common.ftp.FtpDelegate; diff --git a/Aria/src/main/java/com/arialyy/aria/core/upload/HttpNormalTarget.java b/Aria/src/main/java/com/arialyy/aria/core/upload/HttpNormalTarget.java index 3781c94a..a5280ea2 100644 --- a/Aria/src/main/java/com/arialyy/aria/core/upload/HttpNormalTarget.java +++ b/Aria/src/main/java/com/arialyy/aria/core/upload/HttpNormalTarget.java @@ -15,7 +15,7 @@ */ package com.arialyy.aria.core.upload; -import android.support.annotation.CheckResult; +import androidx.annotation.CheckResult; import com.arialyy.aria.core.common.AbsNormalTarget; import com.arialyy.aria.core.common.Suggest; import com.arialyy.aria.core.common.http.HttpDelegate; diff --git a/Aria/src/main/java/com/arialyy/aria/core/upload/HttpStartTarget.java b/Aria/src/main/java/com/arialyy/aria/core/upload/HttpStartTarget.java index 0334a0da..cd77ecae 100644 --- a/Aria/src/main/java/com/arialyy/aria/core/upload/HttpStartTarget.java +++ b/Aria/src/main/java/com/arialyy/aria/core/upload/HttpStartTarget.java @@ -15,7 +15,7 @@ */ package com.arialyy.aria.core.upload; -import android.support.annotation.CheckResult; +import androidx.annotation.CheckResult; import com.arialyy.aria.core.common.AbsStartTarget; import com.arialyy.aria.core.common.Suggest; import com.arialyy.aria.core.common.http.HttpDelegate; diff --git a/Aria/src/main/java/com/arialyy/aria/core/upload/UploadReceiver.java b/Aria/src/main/java/com/arialyy/aria/core/upload/UploadReceiver.java index fe446e94..fe2c4ebf 100644 --- a/Aria/src/main/java/com/arialyy/aria/core/upload/UploadReceiver.java +++ b/Aria/src/main/java/com/arialyy/aria/core/upload/UploadReceiver.java @@ -15,9 +15,9 @@ */ package com.arialyy.aria.core.upload; -import android.support.annotation.CheckResult; -import android.support.annotation.NonNull; import android.text.TextUtils; +import androidx.annotation.CheckResult; +import androidx.annotation.NonNull; import com.arialyy.annotations.TaskEnum; import com.arialyy.aria.core.AriaManager; import com.arialyy.aria.core.command.CancelAllCmd; diff --git a/Aria/src/main/java/com/arialyy/aria/core/upload/uploader/FtpFISAdapter.java b/Aria/src/main/java/com/arialyy/aria/core/upload/uploader/FtpFISAdapter.java index 2a54afec..c85a0308 100644 --- a/Aria/src/main/java/com/arialyy/aria/core/upload/uploader/FtpFISAdapter.java +++ b/Aria/src/main/java/com/arialyy/aria/core/upload/uploader/FtpFISAdapter.java @@ -15,7 +15,7 @@ */ package com.arialyy.aria.core.upload.uploader; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import com.arialyy.aria.util.BufferedRandomAccessFile; import java.io.IOException; import java.io.InputStream; diff --git a/Aria/src/main/java/com/arialyy/aria/util/WeakHandler.java b/Aria/src/main/java/com/arialyy/aria/util/WeakHandler.java index 55a334ab..7f39f5d7 100644 --- a/Aria/src/main/java/com/arialyy/aria/util/WeakHandler.java +++ b/Aria/src/main/java/com/arialyy/aria/util/WeakHandler.java @@ -27,10 +27,9 @@ package com.arialyy.aria.util; import android.os.Handler; import android.os.Looper; import android.os.Message; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.annotation.VisibleForTesting; - +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.annotation.VisibleForTesting; import java.lang.ref.WeakReference; import java.util.concurrent.locks.Lock; import java.util.concurrent.locks.ReentrantLock; @@ -49,7 +48,7 @@ import java.util.concurrent.locks.ReentrantLock; */ @SuppressWarnings("unused") public class WeakHandler { private final Handler.Callback mCallback; - // hard reference to Callback. We need to keep callback in memory + // hard reference to Callback. We need to keep callback in memory private final ExecHandler mExec; private Lock mLock = new ReentrantLock(); @SuppressWarnings("ConstantConditions") @VisibleForTesting final ChainedRef mRunnables = diff --git a/app/build.gradle b/app/build.gradle index d4231281..876b7d14 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -56,8 +56,8 @@ android { dependencies { implementation fileTree(include: ['*.jar'], dir: 'libs') testImplementation 'junit:junit:4.12' - implementation "com.android.support:cardview-v7:${rootProject.ext.supportLibVersion}" - implementation "com.android.support:design:${rootProject.ext.supportLibVersion}" + implementation 'androidx.cardview:cardview:1.0.0' + implementation 'com.google.android.material:material:1.0.0' implementation "org.jetbrains.kotlin:kotlin-stdlib:${rootProject.ext.kotlin_version}" api project(':Aria') diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 0e706085..c736d221 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -53,7 +53,7 @@ diff --git a/app/src/main/java/com/arialyy/simple/MainActivity.java b/app/src/main/java/com/arialyy/simple/MainActivity.java index 0f09b767..0f354836 100644 --- a/app/src/main/java/com/arialyy/simple/MainActivity.java +++ b/app/src/main/java/com/arialyy/simple/MainActivity.java @@ -17,18 +17,18 @@ package com.arialyy.simple; import android.Manifest; -import android.arch.lifecycle.Observer; -import android.arch.lifecycle.ViewModelProviders; import android.content.Context; import android.os.Build; import android.os.Bundle; -import android.support.annotation.Nullable; -import android.support.v7.widget.AppCompatImageView; -import android.support.v7.widget.DividerItemDecoration; -import android.support.v7.widget.LinearLayoutManager; -import android.support.v7.widget.RecyclerView; import android.view.View; import android.widget.TextView; +import androidx.annotation.Nullable; +import androidx.appcompat.widget.AppCompatImageView; +import androidx.lifecycle.Observer; +import androidx.lifecycle.ViewModelProviders; +import androidx.recyclerview.widget.DividerItemDecoration; +import androidx.recyclerview.widget.LinearLayoutManager; +import androidx.recyclerview.widget.RecyclerView; import com.arialyy.frame.permission.OnPermissionCallback; import com.arialyy.frame.permission.PermissionManager; import com.arialyy.frame.util.show.T; @@ -36,15 +36,15 @@ import com.arialyy.simple.base.BaseActivity; import com.arialyy.simple.base.adapter.AbsHolder; import com.arialyy.simple.base.adapter.AbsRVAdapter; import com.arialyy.simple.base.adapter.RvItemClickSupport; -import com.arialyy.simple.core.download.m3u8.M3U8LiveDLoadActivity; -import com.arialyy.simple.core.download.m3u8.M3U8VodDLoadActivity; -import com.arialyy.simple.databinding.ActivityMainBinding; import com.arialyy.simple.core.download.DownloadActivity; import com.arialyy.simple.core.download.FtpDownloadActivity; import com.arialyy.simple.core.download.group.DownloadGroupActivity; import com.arialyy.simple.core.download.group.FTPDirDownloadActivity; +import com.arialyy.simple.core.download.m3u8.M3U8LiveDLoadActivity; +import com.arialyy.simple.core.download.m3u8.M3U8VodDLoadActivity; import com.arialyy.simple.core.upload.FtpUploadActivity; import com.arialyy.simple.core.upload.HttpUploadActivity; +import com.arialyy.simple.databinding.ActivityMainBinding; import com.arialyy.simple.modlue.CommonModule; import com.arialyy.simple.to.NormalTo; import java.util.ArrayList; diff --git a/app/src/main/java/com/arialyy/simple/base/BaseActivity.java b/app/src/main/java/com/arialyy/simple/base/BaseActivity.java index 1e71236e..012e77a5 100644 --- a/app/src/main/java/com/arialyy/simple/base/BaseActivity.java +++ b/app/src/main/java/com/arialyy/simple/base/BaseActivity.java @@ -16,10 +16,10 @@ package com.arialyy.simple.base; -import android.databinding.ViewDataBinding; import android.os.Bundle; -import android.support.v7.widget.Toolbar; import android.view.MenuItem; +import androidx.appcompat.widget.Toolbar; +import androidx.databinding.ViewDataBinding; import com.arialyy.frame.core.AbsActivity; import com.arialyy.frame.util.AndroidVersionUtil; import com.arialyy.simple.R; diff --git a/app/src/main/java/com/arialyy/simple/base/BaseDialog.java b/app/src/main/java/com/arialyy/simple/base/BaseDialog.java index 6233dad4..8a42cf5f 100644 --- a/app/src/main/java/com/arialyy/simple/base/BaseDialog.java +++ b/app/src/main/java/com/arialyy/simple/base/BaseDialog.java @@ -16,7 +16,7 @@ package com.arialyy.simple.base; -import android.databinding.ViewDataBinding; +import androidx.databinding.ViewDataBinding; import android.os.Bundle; import com.arialyy.frame.core.AbsDialogFragment; diff --git a/app/src/main/java/com/arialyy/simple/base/adapter/AbsHolder.java b/app/src/main/java/com/arialyy/simple/base/adapter/AbsHolder.java index 222977cb..c4ece67f 100644 --- a/app/src/main/java/com/arialyy/simple/base/adapter/AbsHolder.java +++ b/app/src/main/java/com/arialyy/simple/base/adapter/AbsHolder.java @@ -15,33 +15,31 @@ */ package com.arialyy.simple.base.adapter; -import android.support.annotation.IdRes; -import android.support.v7.widget.RecyclerView; import android.util.SparseArray; import android.view.View; - +import androidx.annotation.IdRes; +import androidx.recyclerview.widget.RecyclerView; /** * Created by lyy on 2015/12/3. * 通用Holder */ public class AbsHolder extends RecyclerView.ViewHolder { - private View mView; - private SparseArray mViews = new SparseArray<>(); + private View mView; + private SparseArray mViews = new SparseArray<>(); - public AbsHolder(View itemView) { - super(itemView); - mView = itemView; - } + public AbsHolder(View itemView) { + super(itemView); + mView = itemView; + } - @SuppressWarnings("unchecked") - public T findViewById(@IdRes int id) { - View view = mViews.get(id); - if (view == null) { - view = mView.findViewById(id); - mViews.put(id, view); - } - return (T) view; + @SuppressWarnings("unchecked") + public T findViewById(@IdRes int id) { + View view = mViews.get(id); + if (view == null) { + view = mView.findViewById(id); + mViews.put(id, view); } - + return (T) view; + } } \ No newline at end of file diff --git a/app/src/main/java/com/arialyy/simple/base/adapter/AbsRVAdapter.java b/app/src/main/java/com/arialyy/simple/base/adapter/AbsRVAdapter.java index ec1167a9..29a8f50f 100644 --- a/app/src/main/java/com/arialyy/simple/base/adapter/AbsRVAdapter.java +++ b/app/src/main/java/com/arialyy/simple/base/adapter/AbsRVAdapter.java @@ -16,11 +16,10 @@ package com.arialyy.simple.base.adapter; import android.content.Context; -import android.support.v7.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; - +import androidx.recyclerview.widget.RecyclerView; import java.util.ArrayList; import java.util.List; diff --git a/app/src/main/java/com/arialyy/simple/base/adapter/RvItemClickSupport.java b/app/src/main/java/com/arialyy/simple/base/adapter/RvItemClickSupport.java index e42bb060..461c17d4 100644 --- a/app/src/main/java/com/arialyy/simple/base/adapter/RvItemClickSupport.java +++ b/app/src/main/java/com/arialyy/simple/base/adapter/RvItemClickSupport.java @@ -15,10 +15,10 @@ */ package com.arialyy.simple.base.adapter; -import android.support.v7.widget.RecyclerView; import android.view.KeyEvent; import android.view.MotionEvent; import android.view.View; +import androidx.recyclerview.widget.RecyclerView; import com.arialyy.simple.R; /* diff --git a/app/src/main/java/com/arialyy/simple/common/DialogModule.java b/app/src/main/java/com/arialyy/simple/common/DialogModule.java index c594550f..8de9236c 100644 --- a/app/src/main/java/com/arialyy/simple/common/DialogModule.java +++ b/app/src/main/java/com/arialyy/simple/common/DialogModule.java @@ -16,9 +16,9 @@ package com.arialyy.simple.common; -import android.arch.lifecycle.LiveData; -import android.arch.lifecycle.MutableLiveData; import android.text.TextUtils; +import androidx.lifecycle.LiveData; +import androidx.lifecycle.MutableLiveData; import com.arialyy.aria.util.ALog; import com.arialyy.frame.base.BaseViewModule; import java.io.File; diff --git a/app/src/main/java/com/arialyy/simple/common/DirChooseDialog.java b/app/src/main/java/com/arialyy/simple/common/DirChooseDialog.java index 23376c67..724678c6 100644 --- a/app/src/main/java/com/arialyy/simple/common/DirChooseDialog.java +++ b/app/src/main/java/com/arialyy/simple/common/DirChooseDialog.java @@ -17,31 +17,27 @@ package com.arialyy.simple.common; import android.annotation.SuppressLint; import android.app.Dialog; -import android.arch.lifecycle.Observer; -import android.arch.lifecycle.ViewModelProviders; import android.content.Context; import android.content.DialogInterface; import android.os.Bundle; import android.os.Environment; -import android.support.annotation.Nullable; -import android.support.v7.widget.DividerItemDecoration; -import android.support.v7.widget.LinearLayoutManager; -import android.support.v7.widget.RecyclerView; import android.util.DisplayMetrics; import android.view.KeyEvent; -import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; -import android.view.Window; import android.widget.TextView; -import com.arialyy.aria.util.ALog; +import androidx.annotation.Nullable; +import androidx.lifecycle.Observer; +import androidx.lifecycle.ViewModelProviders; +import androidx.recyclerview.widget.DividerItemDecoration; +import androidx.recyclerview.widget.LinearLayoutManager; +import androidx.recyclerview.widget.RecyclerView; import com.arialyy.simple.R; import com.arialyy.simple.base.BaseDialog; import com.arialyy.simple.base.adapter.AbsHolder; import com.arialyy.simple.base.adapter.AbsRVAdapter; import com.arialyy.simple.base.adapter.RvItemClickSupport; import com.arialyy.simple.databinding.DialogChooseDirBinding; -import com.arialyy.simple.databinding.DialogMsgBinding; import java.io.File; import java.util.ArrayList; import java.util.List; diff --git a/app/src/main/java/com/arialyy/simple/core/download/DownloadActivity.java b/app/src/main/java/com/arialyy/simple/core/download/DownloadActivity.java index 8b0516c3..c72a5a0e 100644 --- a/app/src/main/java/com/arialyy/simple/core/download/DownloadActivity.java +++ b/app/src/main/java/com/arialyy/simple/core/download/DownloadActivity.java @@ -16,24 +16,24 @@ package com.arialyy.simple.core.download; -import android.arch.lifecycle.Observer; -import android.arch.lifecycle.ViewModelProviders; import android.content.Context; import android.os.Bundle; -import android.support.annotation.Nullable; -import android.support.v7.widget.AppCompatImageView; -import android.support.v7.widget.GridLayoutManager; -import android.support.v7.widget.RecyclerView; import android.view.View; import android.widget.TextView; +import androidx.annotation.Nullable; +import androidx.appcompat.widget.AppCompatImageView; +import androidx.lifecycle.Observer; +import androidx.lifecycle.ViewModelProviders; +import androidx.recyclerview.widget.GridLayoutManager; +import androidx.recyclerview.widget.RecyclerView; import com.arialyy.simple.MainActivity; import com.arialyy.simple.R; import com.arialyy.simple.base.BaseActivity; import com.arialyy.simple.base.adapter.AbsHolder; import com.arialyy.simple.base.adapter.AbsRVAdapter; import com.arialyy.simple.base.adapter.RvItemClickSupport; -import com.arialyy.simple.databinding.ActivityDownloadMeanBinding; import com.arialyy.simple.core.download.multi_download.MultiTaskActivity; +import com.arialyy.simple.databinding.ActivityDownloadMeanBinding; import com.arialyy.simple.modlue.CommonModule; import com.arialyy.simple.to.NormalTo; import java.util.ArrayList; diff --git a/app/src/main/java/com/arialyy/simple/core/download/FtpDownloadActivity.java b/app/src/main/java/com/arialyy/simple/core/download/FtpDownloadActivity.java index 8bb4be82..f2676900 100644 --- a/app/src/main/java/com/arialyy/simple/core/download/FtpDownloadActivity.java +++ b/app/src/main/java/com/arialyy/simple/core/download/FtpDownloadActivity.java @@ -15,12 +15,12 @@ */ package com.arialyy.simple.core.download; -import android.arch.lifecycle.Observer; -import android.arch.lifecycle.ViewModelProviders; import android.os.Bundle; -import android.support.annotation.Nullable; import android.util.Log; import android.view.View; +import androidx.annotation.Nullable; +import androidx.lifecycle.Observer; +import androidx.lifecycle.ViewModelProviders; import com.arialyy.annotations.Download; import com.arialyy.aria.core.Aria; import com.arialyy.aria.core.common.controller.ControllerType; diff --git a/app/src/main/java/com/arialyy/simple/core/download/FtpDownloadModule.java b/app/src/main/java/com/arialyy/simple/core/download/FtpDownloadModule.java index 6995dc07..965b6170 100644 --- a/app/src/main/java/com/arialyy/simple/core/download/FtpDownloadModule.java +++ b/app/src/main/java/com/arialyy/simple/core/download/FtpDownloadModule.java @@ -16,12 +16,12 @@ package com.arialyy.simple.core.download; -import android.arch.lifecycle.LiveData; -import android.arch.lifecycle.MutableLiveData; import android.content.Context; import android.net.Uri; import android.os.Environment; import android.text.TextUtils; +import androidx.lifecycle.LiveData; +import androidx.lifecycle.MutableLiveData; import com.arialyy.aria.core.Aria; import com.arialyy.aria.core.download.DownloadEntity; import com.arialyy.aria.util.ALog; diff --git a/app/src/main/java/com/arialyy/simple/core/download/HighestPriorityActivity.java b/app/src/main/java/com/arialyy/simple/core/download/HighestPriorityActivity.java index 97569912..1be9790e 100644 --- a/app/src/main/java/com/arialyy/simple/core/download/HighestPriorityActivity.java +++ b/app/src/main/java/com/arialyy/simple/core/download/HighestPriorityActivity.java @@ -16,13 +16,13 @@ package com.arialyy.simple.core.download; import android.os.Bundle; -import android.support.v7.widget.LinearLayoutManager; -import android.support.v7.widget.RecyclerView; import android.view.Menu; import android.view.MenuItem; import android.view.View; import android.widget.Button; import android.widget.TextView; +import androidx.recyclerview.widget.LinearLayoutManager; +import androidx.recyclerview.widget.RecyclerView; import com.arialyy.annotations.Download; import com.arialyy.aria.core.Aria; import com.arialyy.aria.core.download.DownloadEntity; diff --git a/app/src/main/java/com/arialyy/simple/core/download/HttpDownloadModule.java b/app/src/main/java/com/arialyy/simple/core/download/HttpDownloadModule.java index 66b46467..dd449cb9 100644 --- a/app/src/main/java/com/arialyy/simple/core/download/HttpDownloadModule.java +++ b/app/src/main/java/com/arialyy/simple/core/download/HttpDownloadModule.java @@ -16,11 +16,11 @@ package com.arialyy.simple.core.download; -import android.arch.lifecycle.LiveData; -import android.arch.lifecycle.MutableLiveData; import android.content.Context; import android.os.Environment; import android.text.TextUtils; +import androidx.lifecycle.LiveData; +import androidx.lifecycle.MutableLiveData; import com.arialyy.aria.core.Aria; import com.arialyy.aria.core.download.DownloadEntity; import com.arialyy.aria.util.ALog; @@ -47,8 +47,9 @@ public class HttpDownloadModule extends BaseViewModule { * 单任务下载的信息 */ LiveData getHttpDownloadInfo(Context context) { - //String url = AppUtil.getConfigValue(context, HTTP_URL_KEY, defUrl); - String url = "http://sdkdown.muzhiwan.com/openfile/2019/05/21/com.netease.tom.mzw_5ce3ef8754d05.apk"; + String url = AppUtil.getConfigValue(context, HTTP_URL_KEY, defUrl); + //String url = + // "http://sdkdown.muzhiwan.com/openfile/2019/05/21/com.netease.tom.mzw_5ce3ef8754d05.apk"; String filePath = AppUtil.getConfigValue(context, HTTP_PATH_KEY, defFilePath); singDownloadInfo = Aria.download(context).getFirstDownloadEntity(url); @@ -59,7 +60,7 @@ public class HttpDownloadModule extends BaseViewModule { singDownloadInfo.setFilePath(filePath); singDownloadInfo.setFileName(file.getName()); } else { - AppUtil.setConfigValue(context, HTTP_PATH_KEY, singDownloadInfo.getDownloadPath()); + AppUtil.setConfigValue(context, HTTP_PATH_KEY, singDownloadInfo.getFilePath()); AppUtil.setConfigValue(context, HTTP_URL_KEY, singDownloadInfo.getUrl()); } liveData.postValue(singDownloadInfo); diff --git a/app/src/main/java/com/arialyy/simple/core/download/KotlinDownloadActivity.kt b/app/src/main/java/com/arialyy/simple/core/download/KotlinDownloadActivity.kt index 36ef9a2d..19c4639e 100644 --- a/app/src/main/java/com/arialyy/simple/core/download/KotlinDownloadActivity.kt +++ b/app/src/main/java/com/arialyy/simple/core/download/KotlinDownloadActivity.kt @@ -16,8 +16,6 @@ package com.arialyy.simple.core.download -import android.arch.lifecycle.Observer -import android.arch.lifecycle.ViewModelProviders import android.content.BroadcastReceiver import android.content.Context import android.content.Intent @@ -27,6 +25,8 @@ import android.view.Menu import android.view.MenuItem import android.view.View import android.widget.Toast +import androidx.lifecycle.Observer +import androidx.lifecycle.ViewModelProviders import com.arialyy.annotations.Download import com.arialyy.aria.core.Aria import com.arialyy.aria.core.download.DownloadEntity @@ -37,6 +37,7 @@ import com.arialyy.aria.util.ALog import com.arialyy.aria.util.CommonUtil import com.arialyy.frame.util.show.T import com.arialyy.simple.R +import com.arialyy.simple.R.string import com.arialyy.simple.base.BaseActivity import com.arialyy.simple.common.ModifyPathDialog import com.arialyy.simple.common.ModifyUrlDialog @@ -96,11 +97,11 @@ class KotlinDownloadActivity : BaseActivity() { return@Observer } if (entity.state == IEntity.STATE_STOP) { - binding.stateStr = getString(R.string.resume) + binding.stateStr = getString(string.resume) } if (Aria.download(this).load(entity.id).isRunning) { - binding.stateStr = getString(R.string.stop) + binding.stateStr = getString(string.stop) } if (entity.fileSize != 0L) { diff --git a/app/src/main/java/com/arialyy/simple/core/download/SingleTaskActivity.java b/app/src/main/java/com/arialyy/simple/core/download/SingleTaskActivity.java index ebb94c78..099a3a1c 100644 --- a/app/src/main/java/com/arialyy/simple/core/download/SingleTaskActivity.java +++ b/app/src/main/java/com/arialyy/simple/core/download/SingleTaskActivity.java @@ -16,22 +16,21 @@ package com.arialyy.simple.core.download; -import android.arch.lifecycle.Observer; -import android.arch.lifecycle.ViewModelProviders; import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.os.Bundle; -import android.support.annotation.Nullable; import android.util.Log; import android.view.Menu; import android.view.MenuItem; import android.view.MotionEvent; import android.view.View; import android.widget.Toast; +import androidx.annotation.Nullable; +import androidx.lifecycle.Observer; +import androidx.lifecycle.ViewModelProviders; import com.arialyy.annotations.Download; import com.arialyy.aria.core.Aria; -import com.arialyy.aria.core.common.RequestEnum; import com.arialyy.aria.core.common.controller.ControllerType; import com.arialyy.aria.core.download.DownloadEntity; import com.arialyy.aria.core.download.DownloadTask; diff --git a/app/src/main/java/com/arialyy/simple/core/download/m3u8/M3U8LiveDLoadActivity.java b/app/src/main/java/com/arialyy/simple/core/download/m3u8/M3U8LiveDLoadActivity.java index 95b440a8..e31d424c 100644 --- a/app/src/main/java/com/arialyy/simple/core/download/m3u8/M3U8LiveDLoadActivity.java +++ b/app/src/main/java/com/arialyy/simple/core/download/m3u8/M3U8LiveDLoadActivity.java @@ -16,15 +16,15 @@ package com.arialyy.simple.core.download.m3u8; -import android.arch.lifecycle.Observer; -import android.arch.lifecycle.ViewModelProviders; import android.os.Bundle; -import android.support.annotation.Nullable; import android.util.Log; import android.view.Menu; import android.view.MenuItem; import android.view.View; import android.widget.Toast; +import androidx.annotation.Nullable; +import androidx.lifecycle.Observer; +import androidx.lifecycle.ViewModelProviders; import com.arialyy.annotations.Download; import com.arialyy.aria.core.Aria; import com.arialyy.aria.core.common.controller.ControllerType; diff --git a/app/src/main/java/com/arialyy/simple/core/download/m3u8/M3U8LiveModule.java b/app/src/main/java/com/arialyy/simple/core/download/m3u8/M3U8LiveModule.java index d29d02c1..899c39d3 100644 --- a/app/src/main/java/com/arialyy/simple/core/download/m3u8/M3U8LiveModule.java +++ b/app/src/main/java/com/arialyy/simple/core/download/m3u8/M3U8LiveModule.java @@ -16,11 +16,11 @@ package com.arialyy.simple.core.download.m3u8; -import android.arch.lifecycle.LiveData; -import android.arch.lifecycle.MutableLiveData; import android.content.Context; import android.os.Environment; import android.text.TextUtils; +import androidx.lifecycle.LiveData; +import androidx.lifecycle.MutableLiveData; import com.arialyy.aria.core.Aria; import com.arialyy.aria.core.download.DownloadEntity; import com.arialyy.aria.util.ALog; diff --git a/app/src/main/java/com/arialyy/simple/core/download/m3u8/M3U8VodDLoadActivity.java b/app/src/main/java/com/arialyy/simple/core/download/m3u8/M3U8VodDLoadActivity.java index 11440726..c807d983 100644 --- a/app/src/main/java/com/arialyy/simple/core/download/m3u8/M3U8VodDLoadActivity.java +++ b/app/src/main/java/com/arialyy/simple/core/download/m3u8/M3U8VodDLoadActivity.java @@ -16,16 +16,16 @@ package com.arialyy.simple.core.download.m3u8; -import android.arch.lifecycle.Observer; -import android.arch.lifecycle.ViewModelProviders; import android.os.Bundle; -import android.support.annotation.Nullable; -import android.support.v4.app.FragmentTransaction; import android.util.Log; import android.view.Menu; import android.view.MenuItem; import android.view.View; import android.widget.Toast; +import androidx.annotation.Nullable; +import androidx.fragment.app.FragmentTransaction; +import androidx.lifecycle.Observer; +import androidx.lifecycle.ViewModelProviders; import com.arialyy.annotations.Download; import com.arialyy.annotations.M3U8; import com.arialyy.aria.core.Aria; diff --git a/app/src/main/java/com/arialyy/simple/core/download/m3u8/M3U8VodModule.java b/app/src/main/java/com/arialyy/simple/core/download/m3u8/M3U8VodModule.java index bca0c675..46140e9d 100644 --- a/app/src/main/java/com/arialyy/simple/core/download/m3u8/M3U8VodModule.java +++ b/app/src/main/java/com/arialyy/simple/core/download/m3u8/M3U8VodModule.java @@ -16,11 +16,11 @@ package com.arialyy.simple.core.download.m3u8; -import android.arch.lifecycle.LiveData; -import android.arch.lifecycle.MutableLiveData; import android.content.Context; import android.os.Environment; import android.text.TextUtils; +import androidx.lifecycle.LiveData; +import androidx.lifecycle.MutableLiveData; import com.arialyy.aria.core.Aria; import com.arialyy.aria.core.download.DownloadEntity; import com.arialyy.aria.util.ALog; diff --git a/app/src/main/java/com/arialyy/simple/core/download/m3u8/VideoPlayerFragment.java b/app/src/main/java/com/arialyy/simple/core/download/m3u8/VideoPlayerFragment.java index fd119ef0..221f704a 100644 --- a/app/src/main/java/com/arialyy/simple/core/download/m3u8/VideoPlayerFragment.java +++ b/app/src/main/java/com/arialyy/simple/core/download/m3u8/VideoPlayerFragment.java @@ -1,17 +1,17 @@ package com.arialyy.simple.core.download.m3u8; import android.annotation.SuppressLint; -import android.arch.lifecycle.ViewModelProviders; import android.media.AudioManager; import android.media.MediaPlayer; import android.os.Build; import android.os.Bundle; -import android.support.annotation.RequiresApi; import android.text.TextUtils; import android.util.SparseArray; import android.view.SurfaceHolder; import android.view.View; import android.widget.SeekBar; +import androidx.annotation.RequiresApi; +import androidx.lifecycle.ViewModelProviders; import com.arialyy.aria.core.download.DownloadEntity; import com.arialyy.aria.core.download.m3u8.M3U8Entity; import com.arialyy.aria.util.ALog; diff --git a/app/src/main/java/com/arialyy/simple/core/download/multi_download/MultiDownloadActivity.java b/app/src/main/java/com/arialyy/simple/core/download/multi_download/MultiDownloadActivity.java index 65e4953c..c5767345 100644 --- a/app/src/main/java/com/arialyy/simple/core/download/multi_download/MultiDownloadActivity.java +++ b/app/src/main/java/com/arialyy/simple/core/download/multi_download/MultiDownloadActivity.java @@ -17,11 +17,11 @@ package com.arialyy.simple.core.download.multi_download; import android.os.Bundle; -import android.support.v7.widget.LinearLayoutManager; -import android.support.v7.widget.RecyclerView; import android.util.Log; import android.view.Menu; import android.view.MenuItem; +import androidx.recyclerview.widget.LinearLayoutManager; +import androidx.recyclerview.widget.RecyclerView; import com.arialyy.annotations.Download; import com.arialyy.annotations.DownloadGroup; import com.arialyy.aria.core.Aria; @@ -76,7 +76,7 @@ public class MultiDownloadActivity extends BaseActivity - - - - - - - - - - - - \ No newline at end of file + \ No newline at end of file diff --git a/app/src/main/res/layout/item_main.xml b/app/src/main/res/layout/item_main.xml index f00000b9..35601be5 100644 --- a/app/src/main/res/layout/item_main.xml +++ b/app/src/main/res/layout/item_main.xml @@ -8,7 +8,7 @@ android:orientation="vertical" > - diff --git a/app/src/main/res/layout/layout_bar.xml b/app/src/main/res/layout/layout_bar.xml index 47bd31db..c5082c0c 100644 --- a/app/src/main/res/layout/layout_bar.xml +++ b/app/src/main/res/layout/layout_bar.xml @@ -1,10 +1,10 @@ - \ No newline at end of file diff --git a/app/src/main/res/layout/layout_code_demo.xml b/app/src/main/res/layout/layout_code_demo.xml index 73a11b16..15683366 100644 --- a/app/src/main/res/layout/layout_code_demo.xml +++ b/app/src/main/res/layout/layout_code_demo.xml @@ -23,7 +23,7 @@ android:textSize="@dimen/text_size_normal" android:textStyle="bold" /> - -