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
cb4874e5
Commit
cb4874e5
authored
Apr 29, 2019
by
feihuaduo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新gradle版本到3.4.0
修复无法关闭决斗助手的问题
parent
1fe2f0ed
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
87 additions
and
81 deletions
+87
-81
build.gradle
build.gradle
+1
-1
gradle/wrapper/gradle-wrapper.properties
gradle/wrapper/gradle-wrapper.properties
+2
-2
mobile/build.gradle
mobile/build.gradle
+1
-1
mobile/src/main/java/cn/garymb/ygomobile/ui/home/HomeActivity.java
...c/main/java/cn/garymb/ygomobile/ui/home/HomeActivity.java
+10
-10
mobile/src/main/java/cn/garymb/ygomobile/ui/plus/ServiceDuelAssistant.java
...ava/cn/garymb/ygomobile/ui/plus/ServiceDuelAssistant.java
+68
-63
mobile/src/main/java/cn/garymb/ygomobile/ui/preference/fragments/SettingFragment.java
...mb/ygomobile/ui/preference/fragments/SettingFragment.java
+5
-4
No files found.
build.gradle
View file @
cb4874e5
...
@@ -7,7 +7,7 @@ buildscript {
...
@@ -7,7 +7,7 @@ buildscript {
google
()
google
()
}
}
dependencies
{
dependencies
{
classpath
'com.android.tools.build:gradle:3.
3.2
'
classpath
'com.android.tools.build:gradle:3.
4.0
'
//classpath 'me.tatarka:gradle-retrolambda:3.2.5'
//classpath 'me.tatarka:gradle-retrolambda:3.2.5'
}
}
}
}
...
...
gradle/wrapper/gradle-wrapper.properties
View file @
cb4874e5
#
Tue Jan 15 19:19:32
CST 2019
#
Mon Apr 29 12:47:40
CST 2019
distributionBase
=
GRADLE_USER_HOME
distributionBase
=
GRADLE_USER_HOME
distributionPath
=
wrapper/dists
distributionPath
=
wrapper/dists
zipStoreBase
=
GRADLE_USER_HOME
zipStoreBase
=
GRADLE_USER_HOME
zipStorePath
=
wrapper/dists
zipStorePath
=
wrapper/dists
distributionUrl
=
https
\:
//services.gradle.org/distributions/gradle-
4.10
.1-all.zip
distributionUrl
=
https
\:
//services.gradle.org/distributions/gradle-
5.1
.1-all.zip
mobile/build.gradle
View file @
cb4874e5
...
@@ -101,7 +101,7 @@ dependencies {
...
@@ -101,7 +101,7 @@ dependencies {
implementation
fileTree
(
dir:
'libs'
,
include:
[
'*.jar'
])
implementation
fileTree
(
dir:
'libs'
,
include:
[
'*.jar'
])
//
//
implementation
(
name:
'paysdk-release-1.2.4'
,
ext:
'aar'
)
implementation
(
name:
'paysdk-release-1.2.4'
,
ext:
'aar'
)
implementation
'com.pgyersdk:sdk:3.0.4'
implementation
"com.pgyersdk:sdk:3.0.4"
}
}
mobile/src/main/java/cn/garymb/ygomobile/ui/home/HomeActivity.java
View file @
cb4874e5
...
@@ -220,12 +220,12 @@ public abstract class HomeActivity extends BaseActivity implements NavigationVie
...
@@ -220,12 +220,12 @@ public abstract class HomeActivity extends BaseActivity implements NavigationVie
};
};
//x5内核初始化接口
//x5内核初始化接口
QbSdk
.
initX5Environment
(
this
,
cb
);
QbSdk
.
initX5Environment
(
this
,
cb
);
//trpay
//trpay
TrPay
.
getInstance
(
HomeActivity
.
this
).
initPaySdk
(
"e1014da420ea4405898c01273d6731b6"
,
"YGOMobile"
);
TrPay
.
getInstance
(
HomeActivity
.
this
).
initPaySdk
(
"e1014da420ea4405898c01273d6731b6"
,
"YGOMobile"
);
//autoupadte checking
//autoupadte checking
checkPgyerUpdateSilent
(
getContext
(),
false
,
false
,
false
);
checkPgyerUpdateSilent
(
getContext
(),
false
,
false
,
false
);
//ServiceDuelAssistant
//ServiceDuelAssistant
if
(
AppsSettings
.
get
().
isServiceDuelAssistant
())
{
if
(
Build
.
VERSION
.
SDK_INT
>=
Build
.
VERSION_CODES
.
O
)
{
if
(
Build
.
VERSION
.
SDK_INT
>=
Build
.
VERSION_CODES
.
O
)
{
DialogPlus
dialogPlus
=
PermissionUtil
.
isNotificationPermission
(
this
);
DialogPlus
dialogPlus
=
PermissionUtil
.
isNotificationPermission
(
this
);
if
(
dialogPlus
==
null
)
if
(
dialogPlus
==
null
)
...
@@ -235,7 +235,7 @@ public abstract class HomeActivity extends BaseActivity implements NavigationVie
...
@@ -235,7 +235,7 @@ public abstract class HomeActivity extends BaseActivity implements NavigationVie
}
else
{
}
else
{
startService
(
new
Intent
(
this
,
ServiceDuelAssistant
.
class
));
startService
(
new
Intent
(
this
,
ServiceDuelAssistant
.
class
));
}
}
}
//萌卡
//萌卡
StartMycard
();
StartMycard
();
checkNotch
();
checkNotch
();
...
...
mobile/src/main/java/cn/garymb/ygomobile/ui/plus/ServiceDuelAssistant.java
View file @
cb4874e5
...
@@ -90,6 +90,7 @@ public class ServiceDuelAssistant extends Service {
...
@@ -90,6 +90,7 @@ public class ServiceDuelAssistant extends Service {
private
WindowManager
.
LayoutParams
wmParams
;
private
WindowManager
.
LayoutParams
wmParams
;
private
WindowManager
mWindowManager
;
private
WindowManager
mWindowManager
;
private
ClipboardManager
cm
;
@Override
@Override
public
IBinder
onBind
(
Intent
p1
)
{
public
IBinder
onBind
(
Intent
p1
)
{
...
@@ -112,15 +113,20 @@ public class ServiceDuelAssistant extends Service {
...
@@ -112,15 +113,20 @@ public class ServiceDuelAssistant extends Service {
@Override
@Override
public
void
onDestroy
()
{
public
void
onDestroy
()
{
super
.
onDestroy
();
super
.
onDestroy
();
//移除剪贴板监听
cm
.
removePrimaryClipChangedListener
(
onPrimaryClipChangedListener
);
//关闭悬浮窗时的声明
//关闭悬浮窗时的声明
stopForeground
(
true
);
stopForeground
(
true
);
}
}
private
void
startClipboardListener
()
{
private
void
startClipboardListener
()
{
final
ClipboardManager
cm
=
(
ClipboardManager
)
getSystemService
(
Context
.
CLIPBOARD_SERVICE
);
cm
=
(
ClipboardManager
)
getSystemService
(
Context
.
CLIPBOARD_SERVICE
);
if
(
cm
==
null
)
if
(
cm
==
null
)
return
;
return
;
cm
.
addPrimaryClipChangedListener
(
new
ClipboardManager
.
OnPrimaryClipChangedListener
()
{
cm
.
addPrimaryClipChangedListener
(
onPrimaryClipChangedListener
);
}
ClipboardManager
.
OnPrimaryClipChangedListener
onPrimaryClipChangedListener
=
new
ClipboardManager
.
OnPrimaryClipChangedListener
()
{
@Override
@Override
public
void
onPrimaryClipChanged
()
{
public
void
onPrimaryClipChanged
()
{
...
@@ -189,8 +195,7 @@ public class ServiceDuelAssistant extends Service {
...
@@ -189,8 +195,7 @@ public class ServiceDuelAssistant extends Service {
}
}
}
}
}
}
});
};
}
private
void
startForeground
()
{
private
void
startForeground
()
{
...
...
mobile/src/main/java/cn/garymb/ygomobile/ui/preference/fragments/SettingFragment.java
View file @
cb4874e5
...
@@ -181,16 +181,17 @@ public class SettingFragment extends PreferenceFragmentPlus {
...
@@ -181,16 +181,17 @@ public class SettingFragment extends PreferenceFragmentPlus {
if
(
preference
instanceof
CheckBoxPreference
)
{
if
(
preference
instanceof
CheckBoxPreference
)
{
CheckBoxPreference
checkBoxPreference
=
(
CheckBoxPreference
)
preference
;
CheckBoxPreference
checkBoxPreference
=
(
CheckBoxPreference
)
preference
;
mSharedPreferences
.
edit
().
putBoolean
(
preference
.
getKey
(),
checkBoxPreference
.
isChecked
()).
apply
();
mSharedPreferences
.
edit
().
putBoolean
(
preference
.
getKey
(),
checkBoxPreference
.
isChecked
()).
apply
();
//如果
事
设置额外卡库的选项
//如果
是
设置额外卡库的选项
if
(
preference
.
getKey
().
equals
(
PREF_READ_EX
))
{
if
(
preference
.
getKey
().
equals
(
PREF_READ_EX
))
{
//设置使用额外卡库后重新加载卡片数据
//设置使用额外卡库后重新加载卡片数据
DataManager
.
get
().
load
(
true
);
DataManager
.
get
().
load
(
true
);
}
}
//开关决斗助手
//开关决斗助手
if
(
preference
.
getKey
().
equals
(
PREF_START_SERVICEDUELASSISTANT
))
{
if
(
preference
.
getKey
().
equals
(
PREF_START_SERVICEDUELASSISTANT
))
{
getActivity
().
startService
(
new
Intent
(
getContext
(),
ServiceDuelAssistant
.
class
));
if
(
checkBoxPreference
.
isChecked
())
{
if
(!
checkBoxPreference
.
isChecked
())
{
getActivity
().
startService
(
new
Intent
(
getActivity
(),
ServiceDuelAssistant
.
class
));
getActivity
().
stopService
(
new
Intent
(
getContext
(),
ServiceDuelAssistant
.
class
));
}
else
{
getActivity
().
stopService
(
new
Intent
(
getActivity
(),
ServiceDuelAssistant
.
class
));
}
}
}
}
//如果是音效开关
//如果是音效开关
...
...
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