整理:清理不必要的TODO标记

This commit is contained in:
pppscn 2022-06-08 09:09:18 +08:00
parent d2969ef213
commit fefa4b0ab3
13 changed files with 21 additions and 22 deletions

View File

@ -331,7 +331,7 @@ class MainActivity : BaseActivity<ActivityMainBinding?>(),
@Suppress("UNCHECKED_CAST") @Suppress("UNCHECKED_CAST")
PageOption.to(Class.forName(widgetInfo.classPath) as Class<XPageFragment>) //跳转的fragment PageOption.to(Class.forName(widgetInfo.classPath) as Class<XPageFragment>) //跳转的fragment
.setNewActivity(true) .setNewActivity(true)
.putInt(KEY_SENDER_TYPE, pos) //TODO需要注意这里目前刚好是这个顺序而已 .putInt(KEY_SENDER_TYPE, pos) //注意:目前刚好是这个顺序而已
.open(this) .open(this)
} catch (e: Exception) { } catch (e: Exception) {
e.printStackTrace() e.printStackTrace()

View File

@ -24,7 +24,7 @@ class AppListAdapterItem {
constructor(name: String) : this(name, null, null) constructor(name: String) : this(name, null, null)
constructor(name: String, drawableId: Int, packageName: String) : this(name, ResUtils.getDrawable(drawableId), packageName) constructor(name: String, drawableId: Int, packageName: String) : this(name, ResUtils.getDrawable(drawableId), packageName)
//TODO:注意自定义实体需要重写对象的toString方法 //注意自定义实体需要重写对象的toString方法
override fun toString(): String { override fun toString(): String {
return name return name
} }

View File

@ -71,7 +71,7 @@ class SenderAdapterItem {
return this return this
} }
//TODO:注意自定义实体需要重写对象的toString方法 //注意自定义实体需要重写对象的toString方法
override fun toString(): String { override fun toString(): String {
return title.toString() return title.toString()
} }

View File

@ -94,9 +94,9 @@ class WebViewInterceptDialog : AppCompatActivity(), DialogInterface.OnDismissLis
companion object { companion object {
private const val KEY_INTERCEPT_URL = "key_intercept_url" private const val KEY_INTERCEPT_URL = "key_intercept_url"
// TODO: 2019-10-30 这里修改你的applink // TODO: 修改你的applink
const val APP_LINK_HOST = "xuexiangjys.club" const val APP_LINK_HOST = "ppps.cn"
const val APP_LINK_ACTION = "com.xuexiang.xui.applink" const val APP_LINK_ACTION = "com.idormy.sms.forwarder"
/** /**
* 显示WebView拦截提示 * 显示WebView拦截提示

View File

@ -477,9 +477,9 @@ class RulesEditFragment : BaseFragment<FragmentRulesEditBinding?>(), View.OnClic
else -> CHECK_SIM_SLOT_ALL else -> CHECK_SIM_SLOT_ALL
} }
val status = if (binding!!.sbStatus.isChecked) STATUS_ON else STATUS_OFF val status = if (binding!!.sbStatus.isChecked) STATUS_ON else STATUS_OFF
if (status == STATUS_OFF) { //if (status == STATUS_OFF) {
throw Exception(getString(R.string.invalid_rule_status)) // throw Exception(getString(R.string.invalid_rule_status))
} //}
return Rule(ruleId, ruleType, filed, check, value, senderId, smsTemplate, regexReplace, simSlot, status) return Rule(ruleId, ruleType, filed, check, value, senderId, smsTemplate, regexReplace, simSlot, status)
} }

View File

@ -65,7 +65,7 @@ class SendersFragment : BaseFragment<FragmentSendersBinding?>(), SenderPagingAda
binding!!.tabBar.setOnTabClickListener { _, position -> binding!!.tabBar.setOnTabClickListener { _, position ->
//XToastUtils.toast("点击了$title--$position") //XToastUtils.toast("点击了$title--$position")
//currentStatus = statusValueArray[position] //currentStatus = statusValueArray[position]
currentStatus = 1 - position //TODO:取巧,这里刚好相反 currentStatus = 1 - position //注意:这里刚好相反,可以取巧
viewModel.setStatus(currentStatus) viewModel.setStatus(currentStatus)
adapter.refresh() adapter.refresh()
binding!!.recyclerView.scrollToPosition(0) binding!!.recyclerView.scrollToPosition(0)

View File

@ -154,7 +154,7 @@ class TelegramFragment : BaseFragment<FragmentSendersTelegramBinding?>(), View.O
} }
override fun onCheckedChanged(buttonView: CompoundButton?, isChecked: Boolean) { override fun onCheckedChanged(buttonView: CompoundButton?, isChecked: Boolean) {
//TODO: 这里只有一个监听不需要判断id //注意:因为只有一个监听,暂不需要判断id
binding!!.layoutProxyAuthenticator.visibility = if (isChecked) View.VISIBLE else View.GONE binding!!.layoutProxyAuthenticator.visibility = if (isChecked) View.VISIBLE else View.GONE
} }

View File

@ -139,7 +139,7 @@ class WeworkAgentFragment : BaseFragment<FragmentSendersWeworkAgentBinding?>(),
@SuppressLint("SetTextI18n") @SuppressLint("SetTextI18n")
override fun onCheckedChanged(buttonView: CompoundButton?, isChecked: Boolean) { override fun onCheckedChanged(buttonView: CompoundButton?, isChecked: Boolean) {
//TODO: 这里只有一个监听不需要判断id //注意:因为只有一个监听,暂不需要判断id
if (isChecked) { if (isChecked) {
binding!!.etToUser.setText("@all") binding!!.etToUser.setText("@all")
binding!!.layoutToUser.visibility = View.GONE binding!!.layoutToUser.visibility = View.GONE

View File

@ -45,7 +45,7 @@ class LoggerInterceptor : HandlerInterceptor {
} }
/* /*
//TODO:这里读取body会导致 MessageConverter 报错RequestBody is missing. //注意:这里读取body会导致 MessageConverter 报错RequestBody is missing.
val body = request.body?.string() val body = request.body?.string()
Log.i(TAG, "Body: $body") Log.i(TAG, "Body: $body")
*/ */

View File

@ -120,7 +120,7 @@ class PhoneUtils private constructor() {
val sendPI = PendingIntent.getBroadcast(XUtil.getContext(), 0, Intent(), sendFlags) val sendPI = PendingIntent.getBroadcast(XUtil.getContext(), 0, Intent(), sendFlags)
val smsManager = if (subId > -1 && Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP_MR1) SmsManager.getSmsManagerForSubscriptionId(subId) else SmsManager.getDefault() val smsManager = if (subId > -1 && Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP_MR1) SmsManager.getSmsManagerForSubscriptionId(subId) else SmsManager.getDefault()
//TODO: Android 5.1.1 以下使用反射指定卡槽 // Android 5.1.1 以下使用反射指定卡槽
if (subId > -1 && Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP_MR1) { if (subId > -1 && Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP_MR1) {
Log.d(TAG, "Android 5.1.1 以下使用反射指定卡槽") Log.d(TAG, "Android 5.1.1 以下使用反射指定卡槽")
val clz = SmsManager::class.java val clz = SmsManager::class.java
@ -129,7 +129,7 @@ class PhoneUtils private constructor() {
field.set(smsManager, subId) field.set(smsManager, subId)
} }
//TODO: 切割长短信 // 切割长短信
if (message.length >= 70) { if (message.length >= 70) {
val deliverFlags = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) PendingIntent.FLAG_IMMUTABLE else 0 val deliverFlags = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) PendingIntent.FLAG_IMMUTABLE else 0
val deliverPI = PendingIntent.getBroadcast(XUtil.getContext(), 0, Intent("DELIVERED_SMS_ACTION"), deliverFlags) val deliverPI = PendingIntent.getBroadcast(XUtil.getContext(), 0, Intent("DELIVERED_SMS_ACTION"), deliverFlags)
@ -172,7 +172,7 @@ class PhoneUtils private constructor() {
Log.d(TAG, "selection = $selection") Log.d(TAG, "selection = $selection")
Log.d(TAG, "selectionArgs = $selectionArgs") Log.d(TAG, "selectionArgs = $selectionArgs")
//TODO避免超过总数后循环取出 // 避免超过总数后循环取出
val cursorTotal = Core.app.contentResolver.query( val cursorTotal = Core.app.contentResolver.query(
CallLog.Calls.CONTENT_URI, CallLog.Calls.CONTENT_URI,
null, null,
@ -279,7 +279,7 @@ class PhoneUtils private constructor() {
Log.d(TAG, "selection = $selection") Log.d(TAG, "selection = $selection")
Log.d(TAG, "selectionArgs = $selectionArgs") Log.d(TAG, "selectionArgs = $selectionArgs")
//TODO避免超过总数后循环取出 // 避免超过总数后循环取出
val cursorTotal = Core.app.contentResolver.query( val cursorTotal = Core.app.contentResolver.query(
ContactsContract.CommonDataKinds.Phone.CONTENT_URI, ContactsContract.CommonDataKinds.Phone.CONTENT_URI,
null, null,
@ -376,7 +376,7 @@ class PhoneUtils private constructor() {
Log.d(TAG, "selection = $selection") Log.d(TAG, "selection = $selection")
Log.d(TAG, "selectionArgs = $selectionArgs") Log.d(TAG, "selectionArgs = $selectionArgs")
//TODO避免超过总数后循环取出 // 避免超过总数后循环取出
val cursorTotal = Core.app.contentResolver.query( val cursorTotal = Core.app.contentResolver.query(
Uri.parse("content://sms/"), Uri.parse("content://sms/"),
null, null,

View File

@ -19,7 +19,6 @@ import java.net.Proxy
import java.net.URLEncoder import java.net.URLEncoder
import java.util.concurrent.TimeUnit import java.util.concurrent.TimeUnit
//TODO:待迁移!!!
@Suppress("PrivatePropertyName", "UNUSED_PARAMETER", "unused") @Suppress("PrivatePropertyName", "UNUSED_PARAMETER", "unused")
class TelegramUtils { class TelegramUtils {
companion object { companion object {

View File

@ -14,7 +14,7 @@ import com.xuexiang.xupdate.proxy.impl.AbstractUpdateParser
class CustomUpdateParser : AbstractUpdateParser() { class CustomUpdateParser : AbstractUpdateParser() {
@Throws(Exception::class) @Throws(Exception::class)
override fun parseJson(json: String): UpdateEntity? { override fun parseJson(json: String): UpdateEntity? {
// TODO: 2020-02-18 这里填写你需要自定义的json格式如果使用默认的API就不需要设置 // 填写自定义的json格式如果使用默认的API就不需要设置
return null return null
} }
} }

View File

@ -39,10 +39,10 @@ class UpdateTipDialog : AppCompatActivity(), DialogInterface.OnDismissListener {
companion object { companion object {
const val KEY_CONTENT = "com.idormy.sms.forwarder.utils.update.KEY_CONTENT" const val KEY_CONTENT = "com.idormy.sms.forwarder.utils.update.KEY_CONTENT"
// TODO: 2021/5/11 填写你应用下载类型名 // 填写你应用下载类型名
const val DOWNLOAD_TYPE_NAME = "酷安" const val DOWNLOAD_TYPE_NAME = "酷安"
// TODO: 2021/5/11 填写你应用下载页面的链接 // 填写你应用下载页面的链接
private const val DOWNLOAD_URL = "https://www.coolapk.com/apk/com.idormy.sms.forwarder" private const val DOWNLOAD_URL = "https://www.coolapk.com/apk/com.idormy.sms.forwarder"
/** /**