Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
YGOMobile-Cn-Ko-En
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-Cn-Ko-En
Commits
d4abe83a
You need to sign in or sign up before continuing.
Commit
d4abe83a
authored
Jan 18, 2019
by
fallenstardust
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
debug也不跳过logo
parent
441e6519
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
44 additions
and
50 deletions
+44
-50
mobile/src/main/java/cn/garymb/ygomobile/ui/activities/LogoActivity.java
.../java/cn/garymb/ygomobile/ui/activities/LogoActivity.java
+7
-8
mobile/src/main/java/cn/garymb/ygomobile/ui/home/MainActivity.java
...c/main/java/cn/garymb/ygomobile/ui/home/MainActivity.java
+37
-42
No files found.
mobile/src/main/java/cn/garymb/ygomobile/ui/activities/LogoActivity.java
View file @
d4abe83a
package
cn.garymb.ygomobile.ui.activities
;
package
cn.garymb.ygomobile.ui.activities
;
import
android.app.Activity
;
import
android.content.Intent
;
import
android.content.Intent
;
import
android.os.Bundle
;
import
android.os.Bundle
;
import
android.os.Handler
;
import
android.os.Handler
;
...
@@ -20,7 +19,7 @@ public class LogoActivity extends BaseActivity {
...
@@ -20,7 +19,7 @@ public class LogoActivity extends BaseActivity {
protected
void
onCreate
(
Bundle
savedInstanceState
)
{
protected
void
onCreate
(
Bundle
savedInstanceState
)
{
super
.
onCreate
(
savedInstanceState
);
super
.
onCreate
(
savedInstanceState
);
setContentView
(
R
.
layout
.
activity_logo
);
setContentView
(
R
.
layout
.
activity_logo
);
if
(
AppsSettings
.
get
().
isOnlyGame
())
{
if
(
AppsSettings
.
get
().
isOnlyGame
())
{
YGOStarter
.
startGame
(
this
,
null
);
YGOStarter
.
startGame
(
this
,
null
);
finish
();
finish
();
return
;
return
;
...
@@ -34,11 +33,11 @@ public class LogoActivity extends BaseActivity {
...
@@ -34,11 +33,11 @@ public class LogoActivity extends BaseActivity {
// 拒绝时, 关闭页面, 缺少主要权限, 无法运行
// 拒绝时, 关闭页面, 缺少主要权限, 无法运行
if
(
requestCode
==
REQUEST_PERMISSIONS
&&
resultCode
==
PermissionsActivity
.
PERMISSIONS_DENIED
)
{
if
(
requestCode
==
REQUEST_PERMISSIONS
&&
resultCode
==
PermissionsActivity
.
PERMISSIONS_DENIED
)
{
finish
();
finish
();
}
else
{
}
else
{
if
(
BuildConfig
.
DEBUG
)
{
// if (BuildConfig.DEBUG)
{
startActivity
(
new
Intent
(
LogoActivity
.
this
,
MainActivity
.
class
));
//
startActivity(new Intent(LogoActivity.this, MainActivity.class));
finish
();
//
finish();
}
else
{
// }
else {
handler
=
new
Handler
();
handler
=
new
Handler
();
runnable
=
new
Runnable
()
{
runnable
=
new
Runnable
()
{
@Override
@Override
...
@@ -49,7 +48,7 @@ public class LogoActivity extends BaseActivity {
...
@@ -49,7 +48,7 @@ public class LogoActivity extends BaseActivity {
};
};
handler
.
postDelayed
(
runnable
,
1000
);
handler
.
postDelayed
(
runnable
,
1000
);
Toast
.
makeText
(
LogoActivity
.
this
,
R
.
string
.
logo_text
,
Toast
.
LENGTH_SHORT
).
show
();
Toast
.
makeText
(
LogoActivity
.
this
,
R
.
string
.
logo_text
,
Toast
.
LENGTH_SHORT
).
show
();
}
//
}
}
}
}
}
...
...
mobile/src/main/java/cn/garymb/ygomobile/ui/home/MainActivity.java
View file @
d4abe83a
...
@@ -3,18 +3,13 @@ package cn.garymb.ygomobile.ui.home;
...
@@ -3,18 +3,13 @@ package cn.garymb.ygomobile.ui.home;
import
android.Manifest
;
import
android.Manifest
;
import
android.annotation.SuppressLint
;
import
android.annotation.SuppressLint
;
import
android.content.ComponentName
;
import
android.content.ComponentName
;
import
android.content.Context
;
import
android.content.DialogInterface
;
import
android.content.DialogInterface
;
import
android.content.Intent
;
import
android.content.Intent
;
import
android.content.pm.PackageManager
;
import
android.graphics.Color
;
import
android.graphics.Color
;
import
android.os.AsyncTask
;
import
android.os.AsyncTask
;
import
android.os.Build
;
import
android.os.Build
;
import
android.os.Bundle
;
import
android.os.Bundle
;
import
android.provider.Settings
;
import
android.support.annotation.NonNull
;
import
android.support.annotation.NonNull
;
import
android.support.v4.app.ActivityCompat
;
import
android.support.v4.app.NotificationManagerCompat
;
import
android.util.Log
;
import
android.util.Log
;
import
java.io.IOException
;
import
java.io.IOException
;
...
@@ -38,12 +33,12 @@ import static cn.garymb.ygomobile.Constants.NETWORK_IMAGE;
...
@@ -38,12 +33,12 @@ import static cn.garymb.ygomobile.Constants.NETWORK_IMAGE;
import
static
cn
.
garymb
.
ygomobile
.
ui
.
home
.
ResCheckTask
.
ResCheckListener
;
import
static
cn
.
garymb
.
ygomobile
.
ui
.
home
.
ResCheckTask
.
ResCheckListener
;
import
static
cn
.
garymb
.
ygomobile
.
ui
.
home
.
ResCheckTask
.
getDatapath
;
import
static
cn
.
garymb
.
ygomobile
.
ui
.
home
.
ResCheckTask
.
getDatapath
;
public
class
MainActivity
extends
HomeActivity
{
public
class
MainActivity
extends
HomeActivity
{
private
GameUriManager
mGameUriManager
;
private
GameUriManager
mGameUriManager
;
private
ImageUpdater
mImageUpdater
;
private
ImageUpdater
mImageUpdater
;
private
boolean
enableStart
;
private
boolean
enableStart
;
ResCheckTask
mResCheckTask
;
ResCheckTask
mResCheckTask
;
private
final
String
[]
PERMISSIONS
={
private
final
String
[]
PERMISSIONS
=
{
// Manifest.permission.RECORD_AUDIO,
// Manifest.permission.RECORD_AUDIO,
Manifest
.
permission
.
READ_PHONE_STATE
,
Manifest
.
permission
.
READ_PHONE_STATE
,
Manifest
.
permission
.
SYSTEM_ALERT_WINDOW
,
Manifest
.
permission
.
SYSTEM_ALERT_WINDOW
,
...
@@ -84,7 +79,7 @@ public class MainActivity extends HomeActivity{
...
@@ -84,7 +79,7 @@ public class MainActivity extends HomeActivity{
}
}
if
(
isNew
)
{
if
(
isNew
)
{
if
(!
getGameUriManager
().
doIntent
(
getIntent
()))
{
if
(!
getGameUriManager
().
doIntent
(
getIntent
()))
{
DialogPlus
dialog
=
new
DialogPlus
(
this
)
DialogPlus
dialog
=
new
DialogPlus
(
this
)
.
setTitleText
(
getString
(
R
.
string
.
settings_about_change_log
))
.
setTitleText
(
getString
(
R
.
string
.
settings_about_change_log
))
.
loadUrl
(
"file:///android_asset/changelog.html"
,
Color
.
TRANSPARENT
)
.
loadUrl
(
"file:///android_asset/changelog.html"
,
Color
.
TRANSPARENT
)
.
hideButton
()
.
hideButton
()
...
@@ -100,14 +95,14 @@ public class MainActivity extends HomeActivity{
...
@@ -100,14 +95,14 @@ public class MainActivity extends HomeActivity{
dialog
.
setOnDismissListener
(
new
DialogInterface
.
OnDismissListener
()
{
dialog
.
setOnDismissListener
(
new
DialogInterface
.
OnDismissListener
()
{
@Override
@Override
public
void
onDismiss
(
DialogInterface
dialogInterface
)
{
public
void
onDismiss
(
DialogInterface
dialogInterface
)
{
PermissionUtil
.
isServicePermission
(
MainActivity
.
this
,
true
);
PermissionUtil
.
isServicePermission
(
MainActivity
.
this
,
true
);
}
}
});
});
dialog
.
show
();
dialog
.
show
();
}
}
}
else
{
}
else
{
PermissionUtil
.
isServicePermission
(
MainActivity
.
this
,
true
);
PermissionUtil
.
isServicePermission
(
MainActivity
.
this
,
true
);
getGameUriManager
().
doIntent
(
getIntent
());
getGameUriManager
().
doIntent
(
getIntent
());
}
}
...
@@ -128,7 +123,7 @@ public class MainActivity extends HomeActivity{
...
@@ -128,7 +123,7 @@ public class MainActivity extends HomeActivity{
protected
void
onDestroy
()
{
protected
void
onDestroy
()
{
YGOStarter
.
onDestroy
(
this
);
YGOStarter
.
onDestroy
(
this
);
super
.
onDestroy
();
super
.
onDestroy
();
if
(
mResCheckTask
!=
null
)
if
(
mResCheckTask
!=
null
)
mResCheckTask
.
unregisterMReceiver
();
mResCheckTask
.
unregisterMReceiver
();
}
}
...
@@ -177,11 +172,11 @@ public class MainActivity extends HomeActivity{
...
@@ -177,11 +172,11 @@ public class MainActivity extends HomeActivity{
@Override
@Override
public
void
updateImages
()
{
public
void
updateImages
()
{
Log
.
e
(
"MainActivity"
,
"重置资源"
);
Log
.
e
(
"MainActivity"
,
"重置资源"
);
DialogPlus
dialog
=
DialogPlus
.
show
(
this
,
null
,
getString
(
R
.
string
.
message
));
DialogPlus
dialog
=
DialogPlus
.
show
(
this
,
null
,
getString
(
R
.
string
.
message
));
dialog
.
show
();
dialog
.
show
();
VUiKit
.
defer
().
when
(()
->
{
VUiKit
.
defer
().
when
(()
->
{
Log
.
e
(
"MainActivity"
,
"开始复制"
);
Log
.
e
(
"MainActivity"
,
"开始复制"
);
try
{
try
{
IOUtils
.
createNoMedia
(
AppsSettings
.
get
().
getResourcePath
());
IOUtils
.
createNoMedia
(
AppsSettings
.
get
().
getResourcePath
());
if
(
IOUtils
.
hasAssets
(
this
,
getDatapath
(
Constants
.
CORE_PICS_ZIP
)))
{
if
(
IOUtils
.
hasAssets
(
this
,
getDatapath
(
Constants
.
CORE_PICS_ZIP
)))
{
...
@@ -202,10 +197,10 @@ public class MainActivity extends HomeActivity{
...
@@ -202,10 +197,10 @@ public class MainActivity extends HomeActivity{
AppsSettings
.
get
().
getCoreSkinPath
(),
false
);
AppsSettings
.
get
().
getCoreSkinPath
(),
false
);
}
catch
(
IOException
e
)
{
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
Log
.
e
(
"MainActivity"
,
"错误"
+
e
);
Log
.
e
(
"MainActivity"
,
"错误"
+
e
);
}
}
}).
done
((
rs
)
->
{
}).
done
((
rs
)
->
{
Log
.
e
(
"MainActivity"
,
"复制完毕"
);
Log
.
e
(
"MainActivity"
,
"复制完毕"
);
dialog
.
dismiss
();
dialog
.
dismiss
();
});
});
}
}
...
...
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