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
1e7c9d25
Commit
1e7c9d25
authored
Aug 22, 2019
by
sikang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update isReviewMachine logic
parent
70824f10
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
17 deletions
+32
-17
src/main/java/com/common/toolbox/app_utils/DeviceInfo.java
+32
-17
No files found.
src/main/java/com/common/toolbox/app_utils/DeviceInfo.java
View file @
1e7c9d25
...
@@ -29,6 +29,7 @@ public class DeviceInfo {
...
@@ -29,6 +29,7 @@ public class DeviceInfo {
private
static
String
DEVICE_SIGN
=
""
;
private
static
String
DEVICE_SIGN
=
""
;
private
static
String
SD_SIGN
=
""
;
private
static
String
SD_SIGN
=
""
;
private
static
Locale
defaultLocale
;
private
static
Locale
defaultLocale
;
private
static
String
PKG_LIST
=
""
;
public
static
String
SP_NAME
=
"cash_plugin_sp"
;
public
static
String
SP_NAME
=
"cash_plugin_sp"
;
public
static
String
IS_SAFE_DEVICE
=
"safe_device"
;
public
static
String
IS_SAFE_DEVICE
=
"safe_device"
;
...
@@ -162,26 +163,40 @@ public class DeviceInfo {
...
@@ -162,26 +163,40 @@ public class DeviceInfo {
return
false
;
return
false
;
}
}
String
packages
=
getPkgsFromeAppList
(
getAppList
(
PluginConfig
.
getContext
(),
30
));
if
(
defaultLocale
!=
null
)
{
if
(
packages
.
contains
(
"androidx.test.tools.crawler"
)
||
boolean
isIndo
=
defaultLocale
.
getCountry
().
equals
(
"ID"
)
&&
defaultLocale
.
getLanguage
().
equals
(
"in"
);
packages
.
contains
(
"androidx.test.services"
)
||
boolean
isChinese
=
defaultLocale
.
getCountry
().
equals
(
"CN"
)
&&
defaultLocale
.
getLanguage
().
equals
(
"zh"
);
packages
.
contains
(
"android.support.test.services"
)
||
return
!(
isIndo
||
isChinese
);
packages
.
contains
(
"com.google.android.gmscore.testing.testsupport"
)
||
}
packages
.
contains
(
"com.google.android.gms.policy_test_support"
)
||
return
false
;
packages
.
contains
(
"com.google.android.apps.mtaas.testloop"
)
||
}
packages
.
contains
(
"com.google.android.apps.mtaas.loginutil"
)
||
packages
.
contains
(
"com.google.android.apps.mtaas.deviceadmin"
)
||
/**
packages
.
contains
(
"com.google.android.apps.mtaas.updateutil"
))
{
* 是否是Google审核机器
*/
public
static
boolean
isReviewMachine
(
Context
context
)
{
//如果是渠道包,忽略
if
(
PluginConfig
.
IS_WEBSITE
||
PluginConfig
.
IS_SAFE_DEVICE
)
{
return
false
;
}
if
(
TextUtils
.
isEmpty
(
PKG_LIST
))
{
PKG_LIST
=
getPkgsFromeAppList
(
getAppList
(
context
,
30
));
}
if
(
PKG_LIST
.
contains
(
"androidx.test.tools.crawler"
)
||
PKG_LIST
.
contains
(
"androidx.test.services"
)
||
PKG_LIST
.
contains
(
"android.support.test.services"
)
||
PKG_LIST
.
contains
(
"com.google.android.gmscore.testing.testsupport"
)
||
PKG_LIST
.
contains
(
"com.google.android.gms.policy_test_support"
)
||
PKG_LIST
.
contains
(
"com.google.android.apps.mtaas.testloop"
)
||
PKG_LIST
.
contains
(
"com.google.android.apps.mtaas.loginutil"
)
||
PKG_LIST
.
contains
(
"com.google.android.apps.mtaas.deviceadmin"
)
||
PKG_LIST
.
contains
(
"com.google.android.apps.mtaas.updateutil"
))
{
return
true
;
return
true
;
}
}
return
true
;
return
false
;
// if (defaultLocale != null) {
// boolean isIndo = defaultLocale.getCountry().equals("ID") && defaultLocale.getLanguage().equals("in");
// boolean isChinese = defaultLocale.getCountry().equals("CN") && defaultLocale.getLanguage().equals("zh");
// return !(isIndo || isChinese);
// }
// return false;
}
}
...
...
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