Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
huangzhicong
/
SmartCanteen
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
e012c1a4
authored
Mar 09, 2020
by
pye52
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
由于TPS设备没有root权限,采取常规installApp方法需要用户介入操作,现已替换成静默安装方案
parent
5892c2a9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
1 deletions
+2
-1
app/src/main/java/com/bgycc/smartcanteen/command/UpdateCommandHandler.java
+2
-1
app/src/main/java/com/bgycc/smartcanteen/utils/DangerousUtils.java
+0
-0
No files found.
app/src/main/java/com/bgycc/smartcanteen/command/UpdateCommandHandler.java
View file @
e012c1a4
...
...
@@ -5,6 +5,7 @@ import com.bgycc.smartcanteen.api.SCRetrofit;
import
com.bgycc.smartcanteen.entity.Command
;
import
com.bgycc.smartcanteen.entity.CommandResponse
;
import
com.bgycc.smartcanteen.entity.CommandUpdate
;
import
com.bgycc.smartcanteen.utils.DangerousUtils
;
import
com.blankj.utilcode.util.AppUtils
;
import
com.blankj.utilcode.util.FileIOUtils
;
import
com.blankj.utilcode.util.FileUtils
;
...
...
@@ -68,7 +69,7 @@ public class UpdateCommandHandler extends CommandHandler {
(
info
.
getPackageName
().
equals
(
BuildConfig
.
APPLICATION_ID
)
&&
info
.
getVersionCode
()
<
BuildConfig
.
VERSION_CODE
))
{
return
failed
(
"不允许安装低版本"
);
}
else
{
AppUtils
.
installApp
(
updateApk
);
DangerousUtils
.
installAppSilent
(
updateApk
);
return
success
(
"安装更新包"
);
}
}
...
...
app/src/main/java/com/bgycc/smartcanteen/utils/DangerousUtils.java
0 → 100644
View file @
e012c1a4
This diff is collapsed.
Click to expand it.
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