mirror of
https://github.com/pppscn/SmsForwarder
synced 2024-11-17 21:25:31 +00:00
整理:Code Review
This commit is contained in:
parent
6571775a0f
commit
9c6f404190
7
app/proguard-rules.pro
vendored
7
app/proguard-rules.pro
vendored
@ -291,3 +291,10 @@
|
||||
-keep interface * implements com.xuexiang.xrouter.facade.template.IProvider
|
||||
# 如果使用了 单类注入,即不定义接口实现 IProvider,需添加下面规则,保护实现
|
||||
-keep class * implements com.xuexiang.xrouter.facade.template.IProvider
|
||||
|
||||
-dontwarn com.alipay.sdk.**
|
||||
-dontwarn com.android.org.conscrypt.**
|
||||
-dontwarn java.awt.image.**
|
||||
-dontwarn javax.lang.model.**
|
||||
-dontwarn javax.naming.**
|
||||
-dontwarn javax.naming.directory.**
|
||||
|
@ -8,6 +8,7 @@
|
||||
tools:ignore="QueryAllPackagesPermission" />
|
||||
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
|
||||
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
|
||||
<uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION" />
|
||||
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
|
||||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
||||
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
|
||||
@ -55,9 +56,6 @@
|
||||
<uses-permission
|
||||
android:name="android.permission.READ_LOGS"
|
||||
tools:ignore="ProtectedPermissions" />
|
||||
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
|
||||
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
|
||||
<uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION" />
|
||||
|
||||
<application
|
||||
android:name=".App"
|
||||
|
@ -14,7 +14,7 @@ import com.alibaba.android.vlayout.DelegateAdapter
|
||||
* @author xuexiang
|
||||
* @since 2020/3/20 12:17 AM
|
||||
*/
|
||||
@Suppress("unused")
|
||||
@Suppress("unused", "WRONG_TYPE_PARAMETER_NULLABILITY_FOR_JAVA_OVERRIDE")
|
||||
abstract class XDelegateAdapter<T, V : RecyclerView.ViewHolder?> : DelegateAdapter.Adapter<V> {
|
||||
/**
|
||||
* 数据源
|
||||
|
@ -20,7 +20,7 @@ import io.github.inflationx.viewpump.ViewPumpContextWrapper
|
||||
* @author XUE
|
||||
* @since 2019/3/22 11:21
|
||||
*/
|
||||
@Suppress("MemberVisibilityCanBePrivate", "UNCHECKED_CAST")
|
||||
@Suppress("MemberVisibilityCanBePrivate", "UNCHECKED_CAST", "DEPRECATION")
|
||||
open class BaseActivity<Binding : ViewBinding?> : XPageActivity() {
|
||||
/**
|
||||
* 获取Binding
|
||||
|
@ -16,7 +16,7 @@ import com.xuexiang.xui.widget.actionbar.TitleUtils
|
||||
* @author xuexiang
|
||||
* @since 2018/11/22 上午11:26
|
||||
*/
|
||||
@Suppress("unused")
|
||||
@Suppress("unused", "UNUSED_PARAMETER")
|
||||
abstract class BaseContainerFragment : XPageContainerListFragment() {
|
||||
override fun initPage() {
|
||||
initTitle()
|
||||
|
@ -11,7 +11,7 @@ import android.webkit.WebView
|
||||
* 修复 Android 5.0 & 5.1 打开 WebView 闪退问题:
|
||||
* 参阅 https://stackoverflow.com/questions/41025200/android-view-inflateexception-error-inflating-class-android-webkit-webview
|
||||
*/
|
||||
@Suppress("unused")
|
||||
@Suppress("unused", "DEPRECATION")
|
||||
class LollipopFixedWebView : WebView {
|
||||
constructor(context: Context) : super(getFixedContext(context))
|
||||
constructor(context: Context, attrs: AttributeSet?) : super(getFixedContext(context), attrs)
|
||||
|
@ -47,6 +47,7 @@ import java.util.*
|
||||
*
|
||||
* 这里主要是做去广告的工作
|
||||
*/
|
||||
@Suppress("UNUSED_PARAMETER", "DEPRECATION", "OVERRIDE_DEPRECATION")
|
||||
open class MiddlewareWebViewClient : MiddlewareWebClientBase() {
|
||||
@RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)
|
||||
override fun shouldOverrideUrlLoading(view: WebView, request: WebResourceRequest): Boolean {
|
||||
|
@ -13,7 +13,7 @@ import com.xuexiang.xui.widget.imageview.preview.enitity.IPreviewInfo
|
||||
* @author xuexiang
|
||||
* @since 2018/12/7 下午5:34
|
||||
*/
|
||||
@Suppress("unused")
|
||||
@Suppress("unused", "DEPRECATION")
|
||||
data class ImageInfo(
|
||||
//图片地址
|
||||
var mUrl: String,
|
||||
|
@ -3,6 +3,7 @@ package com.idormy.sms.forwarder.entity.setting
|
||||
import com.idormy.sms.forwarder.R
|
||||
import java.io.Serializable
|
||||
|
||||
@Suppress("SENSELESS_COMPARISON")
|
||||
data class FeishuAppSetting(
|
||||
var appId: String = "",
|
||||
val appSecret: String = "",
|
||||
|
@ -27,7 +27,7 @@ import com.xuexiang.xui.widget.dialog.materialdialog.DialogAction
|
||||
import com.xuexiang.xui.widget.dialog.materialdialog.MaterialDialog
|
||||
import com.xuexiang.xui.widget.edittext.materialedittext.MaterialEditText
|
||||
|
||||
@Suppress("PrivatePropertyName")
|
||||
@Suppress("PrivatePropertyName", "DEPRECATION")
|
||||
@Page(name = "Frp内网穿透·编辑配置")
|
||||
class FrpcEditFragment : BaseFragment<FragmentFrpcEditBinding?>() {
|
||||
|
||||
|
@ -39,7 +39,7 @@ import io.reactivex.schedulers.Schedulers
|
||||
import java.util.*
|
||||
|
||||
@Page(name = "URL Scheme")
|
||||
@Suppress("PrivatePropertyName")
|
||||
@Suppress("PrivatePropertyName", "DEPRECATION")
|
||||
class UrlSchemeFragment : BaseFragment<FragmentSendersUrlSchemeBinding?>(), View.OnClickListener {
|
||||
|
||||
private val TAG: String = UrlSchemeFragment::class.java.simpleName
|
||||
|
@ -5,6 +5,7 @@ import android.os.Environment
|
||||
import java.io.File
|
||||
import java.math.BigDecimal
|
||||
|
||||
@Suppress("DEPRECATION")
|
||||
class CacheUtils private constructor() {
|
||||
companion object {
|
||||
/**
|
||||
|
@ -12,6 +12,7 @@ import android.provider.Settings
|
||||
import androidx.annotation.RequiresApi
|
||||
import com.idormy.sms.forwarder.R
|
||||
|
||||
@Suppress("DEPRECATION")
|
||||
class KeepAliveUtils private constructor() {
|
||||
|
||||
companion object {
|
||||
|
@ -32,7 +32,7 @@ import com.xuexiang.xutil.resource.ResUtils
|
||||
import java.text.SimpleDateFormat
|
||||
import java.util.*
|
||||
|
||||
@Suppress("PropertyName")
|
||||
@Suppress("PropertyName", "DEPRECATION")
|
||||
class PhoneUtils private constructor() {
|
||||
|
||||
companion object {
|
||||
|
@ -7,6 +7,7 @@ import java.io.*
|
||||
import kotlin.properties.ReadWriteProperty
|
||||
import kotlin.reflect.KProperty
|
||||
|
||||
@Suppress("unused", "UNCHECKED_CAST")
|
||||
class SharedPreference<T>(private val name: String, private val default: T) : ReadWriteProperty<Any?, T> {
|
||||
|
||||
companion object {
|
||||
|
@ -22,10 +22,12 @@ object MailSender {
|
||||
* 发送邮件
|
||||
*/
|
||||
fun sendMail(mail: Mail, onMailSendListener: OnMailSendListener? = null) {
|
||||
@Suppress("OPT_IN_USAGE")
|
||||
val send = GlobalScope.async(Dispatchers.IO) {
|
||||
Transport.send(MailUtil.createMailMessage(mail))
|
||||
}
|
||||
|
||||
@Suppress("OPT_IN_USAGE")
|
||||
GlobalScope.launch(Dispatchers.Main) {
|
||||
runCatching {
|
||||
send.await()
|
||||
|
@ -41,7 +41,7 @@ class UMengInit private constructor() {
|
||||
return
|
||||
}
|
||||
UMConfigure.setLogEnabled(false)
|
||||
UMConfigure.preInit(application, BuildConfig.APP_ID_UMENG, getChannel(application))
|
||||
UMConfigure.preInit(application, BuildConfig.APP_ID_UMENG, getChannel()) //getChannel(application)
|
||||
// 用户同意了隐私协议
|
||||
if (isAgreePrivacy) {
|
||||
realInit(application)
|
||||
@ -62,7 +62,7 @@ class UMengInit private constructor() {
|
||||
UMConfigure.init(
|
||||
application,
|
||||
BuildConfig.APP_ID_UMENG,
|
||||
getChannel(application),
|
||||
getChannel(), //getChannel(application)
|
||||
UMConfigure.DEVICE_TYPE_PHONE,
|
||||
""
|
||||
)
|
||||
@ -78,7 +78,7 @@ class UMengInit private constructor() {
|
||||
* @param context
|
||||
* @return
|
||||
*/
|
||||
private fun getChannel(context: Context?): String {
|
||||
private fun getChannel(): String { //context: Context?
|
||||
//return WalleChannelReader.getChannel(context!!, DEFAULT_CHANNEL_ID)
|
||||
return DEFAULT_CHANNEL_ID
|
||||
}
|
||||
|
@ -4,7 +4,7 @@ buildscript {
|
||||
apply from: './versions.gradle'
|
||||
addRepos(repositories) //增加代码仓库
|
||||
dependencies {
|
||||
classpath "com.android.tools.build:gradle:$versions.android_gradle_plugin"
|
||||
classpath deps.android_gradle_plugin
|
||||
classpath deps.android_maven_gradle_plugin
|
||||
//图片压缩
|
||||
classpath 'com.chenenyu:img-optimizer:1.2.0'
|
||||
@ -58,9 +58,9 @@ allprojects {
|
||||
task clean(type: Delete) {
|
||||
delete rootProject.buildDir
|
||||
|
||||
FileTree tree = fileTree(dir: rootProject.getRootDir())
|
||||
tree.each { File file ->
|
||||
if (file.toString().contains("ajcore") && file.toString().endsWith(".txt")) {
|
||||
FileTree rootTree = fileTree(dir: rootDir)
|
||||
rootTree.each { File file ->
|
||||
if ((file.toString().contains("ajcore") || file.toString().contains("mapping") || file.toString().contains("seeds") || file.toString().contains("unused")) && file.toString().endsWith(".txt")) {
|
||||
delete file
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user