Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
YGOMobile
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
fallenstardust
YGOMobile
Commits
30e76b1d
Commit
30e76b1d
authored
Feb 21, 2020
by
feihuaduo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
决斗助手房间代码判断修改
parent
0f36966f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
5 deletions
+16
-5
mobile/src/main/java/com/ourygo/assistant/service/DuelAssistantService.java
...va/com/ourygo/assistant/service/DuelAssistantService.java
+4
-1
mobile/src/main/java/com/ourygo/assistant/util/ClipManagement.java
...c/main/java/com/ourygo/assistant/util/ClipManagement.java
+12
-1
mobile/src/main/java/com/ourygo/assistant/util/DuelAssistantManagement.java
...va/com/ourygo/assistant/util/DuelAssistantManagement.java
+0
-3
No files found.
mobile/src/main/java/com/ourygo/assistant/service/DuelAssistantService.java
View file @
30e76b1d
...
@@ -368,7 +368,10 @@ public class DuelAssistantService extends Service implements OnDuelAssistantList
...
@@ -368,7 +368,10 @@ public class DuelAssistantService extends Service implements OnDuelAssistantList
@Override
@Override
public
void
onJoinRoom
(
String
password
,
int
id
)
{
public
void
onJoinRoom
(
String
password
,
int
id
)
{
if
(
id
==
ClipManagement
.
ID_CLIP_LISTENER
)
{
if
(
id
==
ClipManagement
.
ID_CLIP_LISTENER
)
{
joinRoom
(
password
);
//如果有悬浮窗权限再显示
if
(
PermissionUtil
.
isServicePermission
(
this
))
{
joinRoom
(
password
);
}
}
}
}
}
...
...
mobile/src/main/java/com/ourygo/assistant/util/ClipManagement.java
View file @
30e76b1d
...
@@ -46,8 +46,19 @@ public class ClipManagement implements ClipboardManager.OnPrimaryClipChangedList
...
@@ -46,8 +46,19 @@ public class ClipManagement implements ClipboardManager.OnPrimaryClipChangedList
//获取剪贴板内容
//获取剪贴板内容
public
String
getClipMessage
()
{
public
String
getClipMessage
()
{
ClipData
clipData
=
clipboardManager
.
getPrimaryClip
();
ClipData
clipData
=
clipboardManager
.
getPrimaryClip
();
if
(
clipData
==
null
)
if
(
clipData
==
null
)
{
try
{
FileLogUtil
.
writeAndTime
(
"剪贴板为空"
);
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
}
return
null
;
return
null
;
}
try
{
FileLogUtil
.
writeAndTime
(
"剪贴板内容获取:"
+
clipData
.
getItemAt
(
0
).
getText
().
toString
());
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
}
return
clipData
.
getItemAt
(
0
).
getText
().
toString
();
return
clipData
.
getItemAt
(
0
).
getText
().
toString
();
}
}
...
...
mobile/src/main/java/com/ourygo/assistant/util/DuelAssistantManagement.java
View file @
30e76b1d
...
@@ -110,11 +110,8 @@ public class DuelAssistantManagement implements OnClipChangedListener {
...
@@ -110,11 +110,8 @@ public class DuelAssistantManagement implements OnClipChangedListener {
if
(
end
-
start
==
passwordPrefixKey
.
length
())
if
(
end
-
start
==
passwordPrefixKey
.
length
())
return
false
;
return
false
;
}
}
//如果有悬浮窗权限再显示
if
(
PermissionUtil
.
isServicePermission
(
context
))
{
onJoinRoom
(
message
.
substring
(
start
,
end
),
id
);
onJoinRoom
(
message
.
substring
(
start
,
end
),
id
);
return
true
;
return
true
;
}
}
}
return
false
;
return
false
;
}
}
...
...
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