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
93677f44
Commit
93677f44
authored
Oct 25, 2019
by
kenan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
print info
parent
3457e3f5
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
57 additions
and
32 deletions
+57
-32
libcore/src/main/java/cn/garymb/ygomobile/interfaces/GameSize.java
...rc/main/java/cn/garymb/ygomobile/interfaces/GameSize.java
+1
-1
mobile/src/main/java/cn/garymb/ygomobile/LocalGameHost.java
mobile/src/main/java/cn/garymb/ygomobile/LocalGameHost.java
+9
-6
mobile/src/main/java/cn/garymb/ygomobile/utils/rom/GoogleChecker.java
...ain/java/cn/garymb/ygomobile/utils/rom/GoogleChecker.java
+33
-0
mobile/src/main/java/cn/garymb/ygomobile/utils/rom/ManufacturerList.java
.../java/cn/garymb/ygomobile/utils/rom/ManufacturerList.java
+2
-0
mobile/src/main/java/cn/garymb/ygomobile/utils/rom/ROMInfo.java
.../src/main/java/cn/garymb/ygomobile/utils/rom/ROMInfo.java
+8
-0
mobile/src/main/java/cn/garymb/ygomobile/utils/rom/RomIdentifier.java
...ain/java/cn/garymb/ygomobile/utils/rom/RomIdentifier.java
+4
-1
mobile/src/main/res/layout/dialog_report.xml
mobile/src/main/res/layout/dialog_report.xml
+0
-24
No files found.
libcore/src/main/java/cn/garymb/ygomobile/interfaces/GameSize.java
View file @
93677f44
...
...
@@ -68,7 +68,7 @@ public class GameSize {
}
public
void
setScreen
(
int
fullW
,
int
fullH
,
int
actW
,
int
actH
)
{
this
.
fullW
=
width
;
this
.
fullW
=
fullW
;
this
.
fullH
=
fullH
;
this
.
actW
=
actW
;
this
.
actH
=
actH
;
...
...
mobile/src/main/java/cn/garymb/ygomobile/LocalGameHost.java
View file @
93677f44
...
...
@@ -161,6 +161,10 @@ class LocalGameHost extends GameHost {
//fix touch point
int
left
=
(
maxW
-
gw
)
/
2
;
int
top
=
(
maxH
-
gh
)
/
2
;
if
(!
immerSiveMode
){
//fix touch
left
=
(
maxW
-
gw
-
config
.
getNotouchHeight
())
/
2
;
}
Log
.
i
(
"kk"
,
"touch fix="
+
left
+
"x"
+
top
);
//if(huawei and liuhai){
// left-=liuhai
...
...
@@ -219,13 +223,12 @@ class LocalGameHost extends GameHost {
Log
.
i
(
"kk"
,
"gen size "
+
size
);
}
((
TextView
)
dlg
.
findViewById
(
R
.
id
.
tv_model
)).
setText
(
Build
.
MODEL
+
"/"
+
Build
.
PRODUCT
);
((
TextView
)
dlg
.
findViewById
(
R
.
id
.
tv_android
)).
setText
(
Build
.
VERSION
.
RELEASE
);
((
TextView
)
dlg
.
findViewById
(
R
.
id
.
tv_rom
)).
setText
(
String
.
valueOf
(
RomIdentifier
.
getRomInfo
(
activity
).
getRom
()));
((
TextView
)
dlg
.
findViewById
(
R
.
id
.
tv_rom_ver
)).
setText
(
RomIdentifier
.
getRomInfo
(
activity
).
getVersion
());
((
TextView
)
dlg
.
findViewById
(
R
.
id
.
tv_cut_screen
)).
setText
(
ScreenUtil
.
hasNotchInformation
(
activity
)
?
"Yes"
:
"No"
);
((
TextView
)
dlg
.
findViewById
(
R
.
id
.
tv_android
)).
setText
(
Build
.
VERSION
.
RELEASE
+
" ("
+
Build
.
VERSION
.
SDK_INT
+
")"
);
((
TextView
)
dlg
.
findViewById
(
R
.
id
.
tv_rom
)).
setText
(
String
.
valueOf
(
RomIdentifier
.
getRomInfo
(
activity
)));
((
TextView
)
dlg
.
findViewById
(
R
.
id
.
tv_cut_screen
)).
setText
(
ScreenUtil
.
hasNotchInformation
(
activity
)
?
"Yes/("
+
config
.
getNotouchHeight
()+
")"
:
"No"
);
((
TextView
)
dlg
.
findViewById
(
R
.
id
.
tv_nav_bar
)).
setText
(
ScreenUtil
.
isNavigationBarShown
(
activity
)
?
"Yes"
:
"No"
);
((
TextView
)
dlg
.
findViewById
(
R
.
id
.
tv_screen_size
)).
setText
(
String
.
format
(
"r
eal:%dx%d, cur=%dx%d, game=%dx%d, notouch=
%d"
,
size
.
getFullW
(),
size
.
getFullH
(),
size
.
getActW
(),
size
.
getActH
(),
size
.
getWidth
(),
size
.
getHeight
(),
config
.
getNotouchHeight
()));
((
TextView
)
dlg
.
findViewById
(
R
.
id
.
tv_screen_size
)).
setText
(
String
.
format
(
"r
:%dx%d,a=%dx%d,k=%s, g=%dx%d,c=%dx
%d"
,
size
.
getFullW
(),
size
.
getFullH
(),
size
.
getActW
(),
size
.
getActH
(),
config
.
isKeepScale
()?
"Y"
:
"N"
,
size
.
getWidth
(),
size
.
getHeight
(),
size
.
getTouchX
(),
size
.
getTouchY
()));
dlg
.
findViewById
(
R
.
id
.
btn_ok
).
setOnClickListener
((
v
)
->
{
dlg
.
dismiss
();
});
...
...
mobile/src/main/java/cn/garymb/ygomobile/utils/rom/GoogleChecker.java
0 → 100644
View file @
93677f44
package
cn.garymb.ygomobile.utils.rom
;
import
android.os.Build
;
import
android.text.TextUtils
;
import
java.util.regex.Matcher
;
import
java.util.regex.Pattern
;
public
class
GoogleChecker
extends
Checker
{
@Override
protected
String
getManufacturer
()
{
return
ManufacturerList
.
GOOGLE
;
}
@Override
protected
String
[]
getAppList
()
{
return
new
String
[]{
"com.google.android.apps.nexuslauncher"
};
}
@Override
public
ROM
getRom
()
{
return
ROM
.
Google
;
}
@Override
public
ROMInfo
checkBuildProp
(
RomProperties
properties
)
throws
Exception
{
ROMInfo
info
=
new
ROMInfo
(
getRom
());
info
.
setVersion
(
Build
.
VERSION
.
RELEASE
);
info
.
setBaseVersion
(
Build
.
VERSION
.
SDK_INT
);
return
info
;
}
}
mobile/src/main/java/cn/garymb/ygomobile/utils/rom/ManufacturerList.java
View file @
93677f44
...
...
@@ -24,4 +24,6 @@ interface ManufacturerList {
String
VIVO
=
"vivo"
;
// vivo
String
AMIGO
=
"amigo"
;
// 金立 // todo
String
GOOGLE
=
"Google"
;
}
mobile/src/main/java/cn/garymb/ygomobile/utils/rom/ROMInfo.java
View file @
93677f44
...
...
@@ -47,4 +47,12 @@ public class ROMInfo {
public
String
getVersion
()
{
return
version
;
}
@Override
public
String
toString
()
{
if
(
version
!=
null
){
return
rom
+
"/"
+
version
;
}
return
String
.
valueOf
(
rom
);
}
}
mobile/src/main/java/cn/garymb/ygomobile/utils/rom/RomIdentifier.java
View file @
93677f44
...
...
@@ -4,6 +4,7 @@ import android.content.Context;
import
android.content.pm.ApplicationInfo
;
import
android.os.Build
;
import
android.os.Environment
;
import
android.util.Log
;
import
java.io.File
;
import
java.io.FileInputStream
;
...
...
@@ -36,7 +37,8 @@ public class RomIdentifier {
new
FuntouchOsChecker
(),
new
FlymeChecker
(),
new
EuiChecker
(),
new
AmigoOsChecker
()
new
AmigoOsChecker
(),
new
GoogleChecker
()
};
}
...
...
@@ -58,6 +60,7 @@ public class RomIdentifier {
// 优先检查 Manufacturer
String
manufacturer
=
Build
.
MANUFACTURER
;
Log
.
i
(
"kk"
,
"manufacturer="
+
manufacturer
);
for
(
IChecker
checker
:
checkers
)
{
if
(
checker
.
checkManufacturer
(
manufacturer
))
{
// 检查完 Manufacturer 后, 再核对一遍应用列表
...
...
mobile/src/main/res/layout/dialog_report.xml
View file @
93677f44
...
...
@@ -78,30 +78,6 @@
tools:text=
"9.0.0"
/>
</LinearLayout>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:orientation=
"horizontal"
android:padding=
"8dp"
>
<TextView
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_weight=
"1"
android:textColor=
"@color/white"
android:text=
"@string/lb_rom_version"
android:textSize=
"12sp"
/>
<TextView
android:id=
"@+id/tv_rom_ver"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_weight=
"2"
android:textColor=
"@color/white"
android:textSize=
"12sp"
tools:text=
"9.0.0"
/>
</LinearLayout>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
...
...
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