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
eeeabdae
Commit
eeeabdae
authored
Aug 03, 2021
by
fallenstardust
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
游戏退出返回游戏主页
parent
dcd7f433
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
9 deletions
+16
-9
libcore/src/main/java/cn/garymb/ygomobile/YGOMobileActivity.java
.../src/main/java/cn/garymb/ygomobile/YGOMobileActivity.java
+16
-9
No files found.
libcore/src/main/java/cn/garymb/ygomobile/YGOMobileActivity.java
View file @
eeeabdae
...
...
@@ -7,7 +7,6 @@
package
cn.garymb.ygomobile
;
import
android.app.NativeActivity
;
import
android.content.BroadcastReceiver
;
import
android.content.Context
;
import
android.content.Intent
;
import
android.content.pm.ActivityInfo
;
...
...
@@ -61,6 +60,9 @@ public class YGOMobileActivity extends NativeActivity implements
private
static
final
int
CHAIN_CONTROL_PANEL_X_POSITION_LEFT_EDGE
=
205
;
private
static
final
int
CHAIN_CONTROL_PANEL_Y_REVERT_POSITION
=
100
;
private
static
final
int
MAX_REFRESH
=
30
*
1000
;
private
static
int
sChainControlXPostion
=
-
1
;
private
static
int
sChainControlYPostion
=
-
1
;
private
static
boolean
USE_SURFACE
=
true
;
protected
final
int
windowsFlags
=
Build
.
VERSION
.
SDK_INT
>=
19
?
(
View
.
SYSTEM_UI_FLAG_LAYOUT_STABLE
...
...
@@ -69,7 +71,6 @@ public class YGOMobileActivity extends NativeActivity implements
|
View
.
SYSTEM_UI_FLAG_FULLSCREEN
|
View
.
SYSTEM_UI_FLAG_IMMERSIVE_STICKY
)
:
View
.
SYSTEM_UI_FLAG_LOW_PROFILE
;
protected
View
mContentView
;
protected
ComboBoxCompat
mGlobalComboBox
;
protected
EditWindowCompat
mGlobalEditText
;
...
...
@@ -79,8 +80,6 @@ public class YGOMobileActivity extends NativeActivity implements
private
NetworkController
mNetController
;
private
volatile
boolean
mOverlayShowRequest
=
false
;
private
volatile
int
mCompatGUIMode
;
private
static
int
sChainControlXPostion
=
-
1
;
private
static
int
sChainControlYPostion
=
-
1
;
private
GameApplication
mApp
;
private
Handler
handler
=
new
Handler
();
private
FullScreenUtils
mFullScreenUtils
;
...
...
@@ -88,10 +87,12 @@ public class YGOMobileActivity extends NativeActivity implements
private
FrameLayout
mLayout
;
private
SurfaceView
mSurfaceView
;
private
boolean
replaced
=
false
;
private
static
boolean
USE_SURFACE
=
true
;
private
String
[]
mArgV
;
// public static int notchHeight;
//电池管理
private
PowerManager
mPM
;
private
PowerManager
.
WakeLock
mLock
;
private
GameApplication
app
()
{
if
(
mApp
==
null
)
{
...
...
@@ -137,10 +138,6 @@ public class YGOMobileActivity extends NativeActivity implements
.
setPackage
(
getPackageName
()));
}
//电池管理
private
PowerManager
mPM
;
private
PowerManager
.
WakeLock
mLock
;
@Override
protected
void
onResume
()
{
super
.
onResume
();
...
...
@@ -551,6 +548,16 @@ public class YGOMobileActivity extends NativeActivity implements
@Override
public
void
onGameExit
()
{
Log
.
e
(
"ygomobile"
,
"game exit"
);
Intent
intent
=
new
Intent
(
"ygomobile.intent.action.GAME"
);
intent
.
addCategory
(
Intent
.
CATEGORY_DEFAULT
);
intent
.
addFlags
(
Intent
.
FLAG_ACTIVITY_NEW_TASK
);
intent
.
addFlags
(
Intent
.
FLAG_ACTIVITY_RESET_TASK_IF_NEEDED
);
intent
.
setPackage
(
getPackageName
());
try
{
startActivity
(
intent
);
}
catch
(
Throwable
ignore
)
{
}
Process
.
killProcess
(
Process
.
myPid
());
}
}
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