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
ed1d63e3
authored
Mar 13, 2020
by
pye52
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
所有设备指令执行流程修改,保证指令在执行过程中各缓存不会被更改
parent
29fde031
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
27 deletions
+15
-27
app/src/main/java/com/bgycc/smartcanteen/command/LogCommandHandler.java
+5
-9
app/src/main/java/com/bgycc/smartcanteen/command/UpdateCommandHandler.java
+5
-9
app/src/main/java/com/bgycc/smartcanteen/command/WifiConfigCommandHandler.java
+5
-9
No files found.
app/src/main/java/com/bgycc/smartcanteen/command/LogCommandHandler.java
View file @
ed1d63e3
...
@@ -51,17 +51,13 @@ public class LogCommandHandler extends CommandHandler {
...
@@ -51,17 +51,13 @@ public class LogCommandHandler extends CommandHandler {
private
static
LogCommandHandler
instance
;
private
static
LogCommandHandler
instance
;
public
static
LogCommandHandler
getInstance
(
Command
command
,
Gson
gson
,
String
deviceSN
,
CommandProgressCallback
callback
)
{
public
static
synchronized
LogCommandHandler
getInstance
(
Command
command
,
Gson
gson
,
String
deviceSN
,
CommandProgressCallback
callback
)
{
if
(
instance
==
null
)
{
if
(
instance
==
null
)
{
synchronized
(
LogCommandHandler
.
class
)
{
instance
=
new
LogCommandHandler
(
command
,
gson
,
deviceSN
,
callback
);
if
(
instance
==
null
)
{
instance
=
new
LogCommandHandler
(
command
,
gson
,
deviceSN
,
callback
);
}
else
{
instance
.
init
(
command
,
gson
,
deviceSN
,
callback
);
}
}
}
else
{
}
else
{
instance
.
init
(
command
,
gson
,
deviceSN
,
callback
);
if
(!
instance
.
start
)
{
instance
.
init
(
command
,
gson
,
deviceSN
,
callback
);
}
}
}
return
instance
;
return
instance
;
}
}
...
...
app/src/main/java/com/bgycc/smartcanteen/command/UpdateCommandHandler.java
View file @
ed1d63e3
...
@@ -53,17 +53,13 @@ public class UpdateCommandHandler extends CommandHandler {
...
@@ -53,17 +53,13 @@ public class UpdateCommandHandler extends CommandHandler {
private
static
UpdateCommandHandler
instance
;
private
static
UpdateCommandHandler
instance
;
public
static
UpdateCommandHandler
getInstance
(
Command
command
,
Gson
gson
,
CommandProgressCallback
callback
)
{
public
static
synchronized
UpdateCommandHandler
getInstance
(
Command
command
,
Gson
gson
,
CommandProgressCallback
callback
)
{
if
(
instance
==
null
)
{
if
(
instance
==
null
)
{
synchronized
(
UpdateCommandHandler
.
class
)
{
instance
=
new
UpdateCommandHandler
(
command
,
gson
,
callback
);
if
(
instance
==
null
)
{
instance
=
new
UpdateCommandHandler
(
command
,
gson
,
callback
);
}
else
{
instance
.
init
(
command
,
gson
,
callback
);
}
}
}
else
{
}
else
{
instance
.
init
(
command
,
gson
,
callback
);
if
(!
instance
.
start
)
{
instance
.
init
(
command
,
gson
,
callback
);
}
}
}
return
instance
;
return
instance
;
}
}
...
...
app/src/main/java/com/bgycc/smartcanteen/command/WifiConfigCommandHandler.java
View file @
ed1d63e3
...
@@ -19,17 +19,13 @@ public class WifiConfigCommandHandler extends CommandHandler {
...
@@ -19,17 +19,13 @@ public class WifiConfigCommandHandler extends CommandHandler {
private
volatile
boolean
start
=
false
;
private
volatile
boolean
start
=
false
;
private
static
WifiConfigCommandHandler
instance
;
private
static
WifiConfigCommandHandler
instance
;
public
static
WifiConfigCommandHandler
getInstance
(
Command
command
,
Gson
gson
,
CommandProgressCallback
callback
)
{
public
static
synchronized
WifiConfigCommandHandler
getInstance
(
Command
command
,
Gson
gson
,
CommandProgressCallback
callback
)
{
if
(
instance
==
null
)
{
if
(
instance
==
null
)
{
synchronized
(
WifiConfigCommandHandler
.
class
)
{
instance
=
new
WifiConfigCommandHandler
(
command
,
gson
,
callback
);
if
(
instance
==
null
)
{
instance
=
new
WifiConfigCommandHandler
(
command
,
gson
,
callback
);
}
else
{
instance
.
init
(
command
,
gson
,
callback
);
}
}
}
else
{
}
else
{
instance
.
init
(
command
,
gson
,
callback
);
if
(!
instance
.
start
)
{
instance
.
init
(
command
,
gson
,
callback
);
}
}
}
return
instance
;
return
instance
;
}
}
...
...
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