Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
StatInfo_1
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
chenyuling
StatInfo_1
Commits
0260e7db
Commit
0260e7db
authored
Nov 02, 2023
by
chenyuling
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
"如果没有获取到sn,默认为ZC2301HSWT"
parent
b490d94c
Pipeline
#1864
canceled with stages
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
3 deletions
+9
-3
build.gradle
app/build.gradle
+1
-1
Const.java
app/src/main/java/com/srthinker/statinfo/constant/Const.java
+1
-1
SettingActivity.java
...java/com/srthinker/statinfo/uis/news/SettingActivity.java
+7
-1
No files found.
app/build.gradle
View file @
0260e7db
...
...
@@ -20,7 +20,7 @@ android {
minSdk
24
targetSdk
32
versionCode
1
versionName
"1.0.
3
"
versionName
"1.0.
4
"
testInstrumentationRunner
"androidx.test.runner.AndroidJUnitRunner"
}
...
...
app/src/main/java/com/srthinker/statinfo/constant/Const.java
View file @
0260e7db
...
...
@@ -5,5 +5,5 @@ import com.srthinker.statinfo.util.common.FileUtil;
public
class
Const
{
public
static
final
String
DEVICE_TYPE
=
"RC500"
;
public
static
final
String
SN_PATH
=
"/sdcard/devicesn/deviceSn.txt"
;
public
static
final
String
DEVICE_SN
=
FileUtil
.
readTextFromFile
(
SN_PATH
);
public
static
String
DEVICE_SN
=
FileUtil
.
readTextFromFile
(
SN_PATH
);
}
app/src/main/java/com/srthinker/statinfo/uis/news/SettingActivity.java
View file @
0260e7db
...
...
@@ -2,11 +2,13 @@ package com.srthinker.statinfo.uis.news;
import
static
com
.
srthinker
.
statinfo
.
constant
.
Const
.
DEVICE_SN
;
import
static
com
.
srthinker
.
statinfo
.
constant
.
Const
.
DEVICE_TYPE
;
import
static
com
.
srthinker
.
statinfo
.
constant
.
Const
.
SN_PATH
;
import
static
com
.
srthinker
.
statinfo
.
constant
.
InOutType
.
ENTER_TYPE
;
import
static
com
.
srthinker
.
statinfo
.
constant
.
InOutType
.
LEAVE_TYPE
;
import
android.content.Intent
;
import
android.os.Bundle
;
import
android.text.TextUtils
;
import
android.util.Log
;
import
com.srthinker.statinfo.database.PersonMgr
;
...
...
@@ -21,6 +23,7 @@ import com.srthinker.statinfo.uis.BaseActivity;
import
com.srthinker.statinfo.uis.GroupActivity
;
import
com.srthinker.statinfo.uis.fragment.ConfigDlgFragment
;
import
com.srthinker.statinfo.util.common.ClickUtil
;
import
com.srthinker.statinfo.util.common.FileUtil
;
import
com.srthinker.statinfo.util.common.SharedUtil
;
import
com.srthinker.statinfo.util.common.Utils
;
import
com.srthinker.statinfo.util.other.NetworkIPMonitor
;
...
...
@@ -66,7 +69,10 @@ public class SettingActivity extends BaseActivity implements ConfigCallback, Que
networkIPMonitor
=
new
NetworkIPMonitor
(
this
);
networkIPMonitor
.
startMonitoring
();
networkIPMonitor
.
setOnIPChangeCallback
(
this
);
DEVICE_SN
=
FileUtil
.
readTextFromFile
(
SN_PATH
);
if
(
TextUtils
.
isEmpty
(
DEVICE_SN
)){
DEVICE_SN
=
"ZC2301HSWT"
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment