mirror of
https://github.com/pppscn/SmsForwarder
synced 2024-11-08 01:10:23 +00:00
升级:frpclib 到 v0.43.0,关于页面展示版本号
This commit is contained in:
parent
bdd62ff77e
commit
440235f8f5
Binary file not shown.
@ -354,7 +354,7 @@ class MainActivity : BaseActivity<ActivityMainBinding?>(),
|
|||||||
val downloadUrl = "https://xupdate.bms.ink/uploads/$FRPC_LIB_VERSION/$cpuAbi/libgojni.so"
|
val downloadUrl = "https://xupdate.bms.ink/uploads/$FRPC_LIB_VERSION/$cpuAbi/libgojni.so"
|
||||||
val mContext = this
|
val mContext = this
|
||||||
val dialog: MaterialDialog = MaterialDialog.Builder(mContext)
|
val dialog: MaterialDialog = MaterialDialog.Builder(mContext)
|
||||||
.title(getString(R.string.frpclib_download_title))
|
.title(String.format(getString(R.string.frpclib_download_title), FRPC_LIB_VERSION))
|
||||||
.content(getString(R.string.frpclib_download_content))
|
.content(getString(R.string.frpclib_download_content))
|
||||||
.contentGravity(GravityEnum.CENTER)
|
.contentGravity(GravityEnum.CENTER)
|
||||||
.progress(false, 0, true)
|
.progress(false, 0, true)
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
package com.idormy.sms.forwarder.fragment
|
package com.idormy.sms.forwarder.fragment
|
||||||
|
|
||||||
|
import android.content.Intent
|
||||||
import android.view.LayoutInflater
|
import android.view.LayoutInflater
|
||||||
|
import android.view.View
|
||||||
import android.view.ViewGroup
|
import android.view.ViewGroup
|
||||||
import com.idormy.sms.forwarder.R
|
import com.idormy.sms.forwarder.R
|
||||||
import com.idormy.sms.forwarder.core.BaseFragment
|
import com.idormy.sms.forwarder.core.BaseFragment
|
||||||
@ -18,6 +20,9 @@ import com.xuexiang.xpage.annotation.Page
|
|||||||
import com.xuexiang.xui.widget.actionbar.TitleBar
|
import com.xuexiang.xui.widget.actionbar.TitleBar
|
||||||
import com.xuexiang.xui.widget.textview.supertextview.SuperTextView
|
import com.xuexiang.xui.widget.textview.supertextview.SuperTextView
|
||||||
import com.xuexiang.xutil.app.AppUtils
|
import com.xuexiang.xutil.app.AppUtils
|
||||||
|
import com.xuexiang.xutil.file.FileUtils
|
||||||
|
import frpclib.Frpclib
|
||||||
|
import java.io.File
|
||||||
import java.text.SimpleDateFormat
|
import java.text.SimpleDateFormat
|
||||||
import java.util.*
|
import java.util.*
|
||||||
|
|
||||||
@ -44,6 +49,11 @@ class AboutFragment : BaseFragment<FragmentAboutBinding?>(), SuperTextView.OnSup
|
|||||||
binding!!.menuVersion.setLeftString(String.format(resources.getString(R.string.about_app_version), AppUtils.getAppVersionName()))
|
binding!!.menuVersion.setLeftString(String.format(resources.getString(R.string.about_app_version), AppUtils.getAppVersionName()))
|
||||||
binding!!.menuCache.setLeftString(String.format(resources.getString(R.string.about_cache_size), CacheUtils.getTotalCacheSize(requireContext())))
|
binding!!.menuCache.setLeftString(String.format(resources.getString(R.string.about_cache_size), CacheUtils.getTotalCacheSize(requireContext())))
|
||||||
|
|
||||||
|
if (FileUtils.isFileExists(context?.filesDir?.absolutePath + "/libs/libgojni.so")) {
|
||||||
|
binding!!.menuFrpc.setLeftString(String.format(resources.getString(R.string.about_frpc_version), Frpclib.getVersion()))
|
||||||
|
binding!!.menuFrpc.visibility = View.VISIBLE
|
||||||
|
}
|
||||||
|
|
||||||
val dateFormat = SimpleDateFormat("yyyy", Locale.CHINA)
|
val dateFormat = SimpleDateFormat("yyyy", Locale.CHINA)
|
||||||
val currentYear = dateFormat.format(Date())
|
val currentYear = dateFormat.format(Date())
|
||||||
binding!!.copyright.text = java.lang.String.format(resources.getString(R.string.about_copyright), currentYear)
|
binding!!.copyright.text = java.lang.String.format(resources.getString(R.string.about_copyright), currentYear)
|
||||||
@ -59,6 +69,21 @@ class AboutFragment : BaseFragment<FragmentAboutBinding?>(), SuperTextView.OnSup
|
|||||||
XToastUtils.success(R.string.about_cache_purged)
|
XToastUtils.success(R.string.about_cache_purged)
|
||||||
binding!!.menuCache.setLeftString(String.format(resources.getString(R.string.about_cache_size), CacheUtils.getTotalCacheSize(requireContext())))
|
binding!!.menuCache.setLeftString(String.format(resources.getString(R.string.about_cache_size), CacheUtils.getTotalCacheSize(requireContext())))
|
||||||
}
|
}
|
||||||
|
binding!!.btnFrpc.setOnClickListener {
|
||||||
|
try {
|
||||||
|
val soFile = File(context?.filesDir?.absolutePath + "/libs/libgojni.so")
|
||||||
|
if (soFile.exists()) soFile.delete()
|
||||||
|
XToastUtils.success(R.string.about_frpc_deleted)
|
||||||
|
|
||||||
|
val intent: Intent? = context?.packageManager?.getLaunchIntentForPackage(context?.packageName.toString())
|
||||||
|
intent?.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP)
|
||||||
|
startActivity(intent)
|
||||||
|
android.os.Process.killProcess(android.os.Process.myPid()) //杀掉以前进程
|
||||||
|
} catch (e: Exception) {
|
||||||
|
e.printStackTrace()
|
||||||
|
XToastUtils.error(e.message.toString())
|
||||||
|
}
|
||||||
|
}
|
||||||
binding!!.btnGithub.setOnClickListener {
|
binding!!.btnGithub.setOnClickListener {
|
||||||
AgentWebActivity.goWeb(context, getString(R.string.url_project_github))
|
AgentWebActivity.goWeb(context, getString(R.string.url_project_github))
|
||||||
}
|
}
|
||||||
|
@ -173,7 +173,7 @@ const val FRONT_CHANNEL_ID = "com.idormy.sms.forwarder"
|
|||||||
const val FRONT_CHANNEL_NAME = "SmsForwarder Foreground Service"
|
const val FRONT_CHANNEL_NAME = "SmsForwarder Foreground Service"
|
||||||
|
|
||||||
//Frp内网穿透
|
//Frp内网穿透
|
||||||
const val FRPC_LIB_VERSION = "0.42.0"
|
const val FRPC_LIB_VERSION = "0.43.0"
|
||||||
const val EVENT_FRPC_UPDATE_CONFIG = "EVENT_FRPC_UPDATE_CONFIG"
|
const val EVENT_FRPC_UPDATE_CONFIG = "EVENT_FRPC_UPDATE_CONFIG"
|
||||||
const val EVENT_FRPC_DELETE_CONFIG = "EVENT_FRPC_DELETE_CONFIG"
|
const val EVENT_FRPC_DELETE_CONFIG = "EVENT_FRPC_DELETE_CONFIG"
|
||||||
const val EVENT_FRPC_RUNNING_ERROR = "EVENT_FRPC_RUNNING_ERROR"
|
const val EVENT_FRPC_RUNNING_ERROR = "EVENT_FRPC_RUNNING_ERROR"
|
||||||
|
@ -69,6 +69,30 @@
|
|||||||
|
|
||||||
</com.xuexiang.xui.widget.textview.supertextview.SuperTextView>
|
</com.xuexiang.xui.widget.textview.supertextview.SuperTextView>
|
||||||
|
|
||||||
|
<com.xuexiang.xui.widget.textview.supertextview.SuperTextView
|
||||||
|
android:id="@+id/menu_frpc"
|
||||||
|
style="@style/InfoItem.AboutWithBtn"
|
||||||
|
android:visibility="gone"
|
||||||
|
app:sLeftTextString="@string/about_frpc_version">
|
||||||
|
|
||||||
|
<com.xuexiang.xui.widget.button.CountDownButton
|
||||||
|
android:id="@+id/btn_frpc"
|
||||||
|
style="@style/Button.Blue"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_centerVertical="true"
|
||||||
|
android:layout_marginEnd="10dp"
|
||||||
|
android:layout_toStartOf="@id/sRightImgId"
|
||||||
|
android:minWidth="30dp"
|
||||||
|
android:minHeight="0dp"
|
||||||
|
android:padding="5dp"
|
||||||
|
android:text="@string/delete_frpc"
|
||||||
|
android:textSize="11sp"
|
||||||
|
app:cdbt_countDown="1000"
|
||||||
|
app:cdbt_enableCountDown="true" />
|
||||||
|
|
||||||
|
</com.xuexiang.xui.widget.textview.supertextview.SuperTextView>
|
||||||
|
|
||||||
|
|
||||||
<com.xuexiang.xui.widget.textview.supertextview.SuperTextView
|
<com.xuexiang.xui.widget.textview.supertextview.SuperTextView
|
||||||
android:id="@+id/menu_wecom_group"
|
android:id="@+id/menu_wecom_group"
|
||||||
|
@ -25,7 +25,9 @@
|
|||||||
|
|
||||||
<string name="about_app_version">App Version: %s</string>
|
<string name="about_app_version">App Version: %s</string>
|
||||||
<string name="about_cache_size">Cache Size: %s</string>
|
<string name="about_cache_size">Cache Size: %s</string>
|
||||||
|
<string name="about_frpc_version">Frpc Version:%s</string>
|
||||||
<string name="about_cache_purged">Cache cleared</string>
|
<string name="about_cache_purged">Cache cleared</string>
|
||||||
|
<string name="about_frpc_deleted">Frpc Deleted, App restarting</string>
|
||||||
<string name="about_copyright">© %1$s PPPSCN All rights reserved.</string>
|
<string name="about_copyright">© %1$s PPPSCN All rights reserved.</string>
|
||||||
<string name="about_item_open_source">OpenSource Repo</string>
|
<string name="about_item_open_source">OpenSource Repo</string>
|
||||||
<string name="about_item_github">GitHub</string>
|
<string name="about_item_github">GitHub</string>
|
||||||
@ -629,6 +631,7 @@
|
|||||||
<string name="add">Add</string>
|
<string name="add">Add</string>
|
||||||
<string name="check_update">Check update</string>
|
<string name="check_update">Check update</string>
|
||||||
<string name="clear_cache">Clear cache</string>
|
<string name="clear_cache">Clear cache</string>
|
||||||
|
<string name="delete_frpc">Delete Frpc</string>
|
||||||
|
|
||||||
<string name="sender_name_status">Channel Name/Status</string>
|
<string name="sender_name_status">Channel Name/Status</string>
|
||||||
<string name="choose_sender_status">Send Channel/Status</string>
|
<string name="choose_sender_status">Send Channel/Status</string>
|
||||||
@ -699,7 +702,7 @@
|
|||||||
<string name="request_succeeded">Request succeeded</string>
|
<string name="request_succeeded">Request succeeded</string>
|
||||||
<string name="request_failed">Request failed: </string>
|
<string name="request_failed">Request failed: </string>
|
||||||
<string name="no_sms_sending_permission">No SMS sending permission</string>
|
<string name="no_sms_sending_permission">No SMS sending permission</string>
|
||||||
<string name="frpclib_download_title">Missing FrpcLib</string>
|
<string name="frpclib_download_title">Missing FrpcLib v%s</string>
|
||||||
<string name="frpclib_download_content">Downloading, please wait…</string>
|
<string name="frpclib_download_content">Downloading, please wait…</string>
|
||||||
<string name="frpclib_version_mismatch">FrpcLib version mismatch, download again</string>
|
<string name="frpclib_version_mismatch">FrpcLib version mismatch, download again</string>
|
||||||
<string name="page_not_found">Page not found!</string>
|
<string name="page_not_found">Page not found!</string>
|
||||||
|
@ -25,7 +25,9 @@
|
|||||||
|
|
||||||
<string name="about_app_version">软件版本:%s</string>
|
<string name="about_app_version">软件版本:%s</string>
|
||||||
<string name="about_cache_size">缓存大小:%s</string>
|
<string name="about_cache_size">缓存大小:%s</string>
|
||||||
|
<string name="about_frpc_version">Frpc版本:%s</string>
|
||||||
<string name="about_cache_purged">已清理缓存</string>
|
<string name="about_cache_purged">已清理缓存</string>
|
||||||
|
<string name="about_frpc_deleted">已删除动态库,重启APP中…</string>
|
||||||
<string name="about_copyright">© %1$s PPPSCN All rights reserved.</string>
|
<string name="about_copyright">© %1$s PPPSCN All rights reserved.</string>
|
||||||
<string name="about_item_open_source">开源仓库</string>
|
<string name="about_item_open_source">开源仓库</string>
|
||||||
<string name="about_item_github">GitHub</string>
|
<string name="about_item_github">GitHub</string>
|
||||||
@ -630,6 +632,7 @@
|
|||||||
<string name="add">添加</string>
|
<string name="add">添加</string>
|
||||||
<string name="check_update">检查更新</string>
|
<string name="check_update">检查更新</string>
|
||||||
<string name="clear_cache">清理缓存</string>
|
<string name="clear_cache">清理缓存</string>
|
||||||
|
<string name="delete_frpc">删除动态库</string>
|
||||||
|
|
||||||
<string name="sender_name_status">通道名称/状态</string>
|
<string name="sender_name_status">通道名称/状态</string>
|
||||||
<string name="choose_sender_status">发送通道/状态</string>
|
<string name="choose_sender_status">发送通道/状态</string>
|
||||||
@ -700,7 +703,7 @@
|
|||||||
<string name="request_succeeded">请求成功</string>
|
<string name="request_succeeded">请求成功</string>
|
||||||
<string name="request_failed">请求失败:</string>
|
<string name="request_failed">请求失败:</string>
|
||||||
<string name="no_sms_sending_permission">没有短信发送权限</string>
|
<string name="no_sms_sending_permission">没有短信发送权限</string>
|
||||||
<string name="frpclib_download_title">缺少 FrpcLib 动态库</string>
|
<string name="frpclib_download_title">缺少 FrpcLib v%s 动态库</string>
|
||||||
<string name="frpclib_download_content">正在下载中,请稍后……</string>
|
<string name="frpclib_download_content">正在下载中,请稍后……</string>
|
||||||
<string name="frpclib_version_mismatch">FrpcLib 版本不匹配,重新下载</string>
|
<string name="frpclib_version_mismatch">FrpcLib 版本不匹配,重新下载</string>
|
||||||
<string name="page_not_found">页面未找到!</string>
|
<string name="page_not_found">页面未找到!</string>
|
||||||
|
Loading…
Reference in New Issue
Block a user