Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
cash_plugin_toolbox
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
sikang
cash_plugin_toolbox
Commits
3b148e0d
Commit
3b148e0d
authored
Jul 27, 2019
by
sikang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加审核假界面
parent
e91c97c7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
11 deletions
+28
-11
src/main/java/com/common/toolbox/app_utils/DeviceInfo.java
+28
-11
No files found.
src/main/java/com/common/toolbox/app_utils/DeviceInfo.java
View file @
3b148e0d
...
...
@@ -15,9 +15,10 @@ import java.util.UUID;
public
class
DeviceInfo
{
private
static
final
String
SIGN_PATH
=
Environment
.
getExternalStorageDirectory
()
+
"/sw_config/device.json"
;
//改强制改变系统语言之前,把系统默认语言记录下来
public
static
String
DEFAULT_LANGUAGE
=
""
;
public
static
String
DEVICE_SIGN
=
""
;
public
static
String
SD_SIGN
=
""
;
private
static
String
DEFAULT_LANGUAGE
=
""
;
private
static
String
DEVICE_SIGN
=
""
;
private
static
String
SD_SIGN
=
""
;
private
static
Locale
defaultLocale
;
/**
* 读取SD卡中的设备指纹
...
...
@@ -120,10 +121,14 @@ public class DeviceInfo {
"root="
+
isRoot
()
+
"&"
+
"user="
+
Build
.
USER
+
"&"
;
if
(
TextUtils
.
isEmpty
(
DEFAULT_LANGUAGE
)
)
{
initDefaultLanguage
(
Locale
.
getDefault
()
);
if
(
defaultLocale
==
null
)
{
defaultLocale
=
Locale
.
getDefault
(
);
}
hardwareInfo
+=
DEFAULT_LANGUAGE
;
hardwareInfo
+=
"country="
+
defaultLocale
.
getCountry
()
+
"&"
+
"language="
+
defaultLocale
.
getLanguage
()
+
"&"
+
"display_country="
+
defaultLocale
.
getDisplayCountry
()
+
"&"
+
"display_language="
+
defaultLocale
.
getDisplayLanguage
()
+
"&"
+
"display_name="
+
defaultLocale
.
getDisplayName
();
return
hardwareInfo
;
}
...
...
@@ -132,11 +137,23 @@ public class DeviceInfo {
* 默认语言被修改前,先记录下来
*/
public
static
void
initDefaultLanguage
(
Locale
locale
)
{
DEFAULT_LANGUAGE
=
"country="
+
locale
.
getCountry
()
+
"&"
+
"language="
+
locale
.
getLanguage
()
+
"&"
+
"display_country="
+
locale
.
getDisplayCountry
()
+
"&"
+
"display_language="
+
locale
.
getDisplayLanguage
()
+
"&"
+
"display_name="
+
locale
.
getDisplayName
();
defaultLocale
=
locale
;
// DEFAULT_LANGUAGE = "country=" + locale.getCountry() + "&" +
// "language=" + locale.getLanguage() + "&" +
// "display_country=" + locale.getDisplayCountry() + "&" +
// "display_language=" + locale.getDisplayLanguage() + "&" +
// "display_name=" + locale.getDisplayName();
}
/**
* 是否是Google审核机器
*/
public
static
boolean
isReviewMachine
()
{
if
(
defaultLocale
!=
null
)
{
return
defaultLocale
.
getCountry
().
equals
(
"US"
)
&&
defaultLocale
.
getLanguage
().
equals
(
"en"
);
}
return
false
;
}
public
static
boolean
isRoot
()
{
...
...
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