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
d05cc689
authored
Jun 02, 2020
by
pye52
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into rel-1.3.6
parents
b6384fef
4383580a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
4 deletions
+2
-4
app/src/main/java/com/bgycc/smartcanteen/command/WifiConfigCommandWorker.java
+1
-3
app/src/main/java/com/bgycc/smartcanteen/viewModel/PayOfflineViewModel.java
+1
-1
No files found.
app/src/main/java/com/bgycc/smartcanteen/command/WifiConfigCommandWorker.java
View file @
d05cc689
...
@@ -14,7 +14,6 @@ import static com.bgycc.smartcanteen.utils.SmartCanteenUtils.TAG;
...
@@ -14,7 +14,6 @@ import static com.bgycc.smartcanteen.utils.SmartCanteenUtils.TAG;
public
class
WifiConfigCommandWorker
extends
CommandWorker
{
public
class
WifiConfigCommandWorker
extends
CommandWorker
{
private
static
final
long
DEFAULT_DELAY
=
3000
;
private
static
final
long
DEFAULT_DELAY
=
3000
;
private
static
final
long
POLLING_DELAY
=
200
;
private
CommandWifiConfig
wifiConfig
;
private
CommandWifiConfig
wifiConfig
;
public
WifiConfigCommandWorker
(
@NonNull
Context
context
,
@NonNull
WorkerParameters
workerParams
)
{
public
WifiConfigCommandWorker
(
@NonNull
Context
context
,
@NonNull
WorkerParameters
workerParams
)
{
...
@@ -61,8 +60,7 @@ public class WifiConfigCommandWorker extends CommandWorker {
...
@@ -61,8 +60,7 @@ public class WifiConfigCommandWorker extends CommandWorker {
try
{
try
{
NetworkUtils
.
connect
(
ssid
,
identity
,
pwd
,
type
);
NetworkUtils
.
connect
(
ssid
,
identity
,
pwd
,
type
);
// 轮询检查wifi是否链接成功
// 轮询检查wifi是否链接成功
for
(
int
i
=
0
;
i
<
50
;
i
++)
{
for
(
int
i
=
0
;
i
<
20
;
i
++)
{
Thread
.
sleep
(
POLLING_DELAY
);
WifiInfo
info
=
NetworkUtils
.
getWifiInfo
();
WifiInfo
info
=
NetworkUtils
.
getWifiInfo
();
if
(
info
==
null
||
info
.
getIpAddress
()
==
0
)
{
if
(
info
==
null
||
info
.
getIpAddress
()
==
0
)
{
continue
;
continue
;
...
...
app/src/main/java/com/bgycc/smartcanteen/viewModel/PayOfflineViewModel.java
View file @
d05cc689
...
@@ -176,7 +176,7 @@ public class PayOfflineViewModel extends ViewModel {
...
@@ -176,7 +176,7 @@ public class PayOfflineViewModel extends ViewModel {
private
class
RequestRunnable
implements
Runnable
{
private
class
RequestRunnable
implements
Runnable
{
// 离线支付每一次上传的订单量(若上传数据量过大服务器会拒绝)
// 离线支付每一次上传的订单量(若上传数据量过大服务器会拒绝)
private
static
final
int
PAY_OFFLINE_PER_LIMIT
=
1
0
;
private
static
final
int
PAY_OFFLINE_PER_LIMIT
=
2
0
;
@Override
@Override
public
void
run
()
{
public
void
run
()
{
long
currentTime
=
System
.
currentTimeMillis
();
long
currentTime
=
System
.
currentTimeMillis
();
...
...
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