Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
android_fiveworld
Project
Project
Details
Activity
Releases
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
android
android_fiveworld
Commits
7bd54bf8
Commit
7bd54bf8
authored
Dec 30, 2021
by
jyx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化未经用户授权时弹出广告问题
parent
f0666051
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
40 additions
and
0 deletions
+40
-0
MintsApplication.java
app/src/main/java/com/mints/fiveworld/MintsApplication.java
+40
-0
No files found.
app/src/main/java/com/mints/fiveworld/MintsApplication.java
View file @
7bd54bf8
...
...
@@ -237,6 +237,11 @@ public class MintsApplication extends BaseApp {
HomeKeyWatch
.
getInstance
(
this
).
begin
(
new
HomeKeyWatch
.
HomeKeyStateListener
()
{
@Override
public
void
onHOME_KEY
()
{
if
(
com
.
mints
.
fiveworld
.
manager
.
AppPreferencesManager
.
INSTANCE
.
get
(
mContext
)
.
getBoolean
(
Constant
.
LOAN_PERMISSION_FLAG
,
true
))
{
return
;
}
ForegroundOrBackground
.
resetAppOutCount
();
WifiAdManager
.
Companion
.
getInstance
().
resetAdLoadOk
();
AppOutWifiAdManager
.
Companion
.
getInstance
().
resetAdLoadOk
();
...
...
@@ -258,6 +263,11 @@ public class MintsApplication extends BaseApp {
new
WifiWatch
(
this
,
new
WifiWatch
.
OnWifiListener
()
{
@Override
public
void
onWifiDisabled
()
{
if
(
com
.
mints
.
fiveworld
.
manager
.
AppPreferencesManager
.
INSTANCE
.
get
(
mContext
)
.
getBoolean
(
Constant
.
LOAN_PERMISSION_FLAG
,
true
))
{
return
;
}
UmengManager
.
INSTANCE
.
onEvent
(
AdReportManager
.
EventType
.
EVENT_TYPE_SCENCE_BEGIN
.
name
());
AlarmManager
.
getInstance
().
isTimerTimeOut
(
Constant
.
CARRIER_CONNECT_WIFI
);
...
...
@@ -271,6 +281,11 @@ public class MintsApplication extends BaseApp {
@Override
public
void
onWifiEnabled
()
{
if
(
com
.
mints
.
fiveworld
.
manager
.
AppPreferencesManager
.
INSTANCE
.
get
(
mContext
)
.
getBoolean
(
Constant
.
LOAN_PERMISSION_FLAG
,
true
))
{
return
;
}
UmengManager
.
INSTANCE
.
onEvent
(
AdReportManager
.
EventType
.
EVENT_TYPE_SCENCE_BEGIN
.
name
());
AlarmManager
.
getInstance
().
isTimerTimeOut
(
Constant
.
CARRIER_DISCONNECT_WIFI
);
...
...
@@ -287,6 +302,11 @@ public class MintsApplication extends BaseApp {
PhoneWatch
.
getInstance
(
this
).
begin
(
new
PhoneWatch
.
PhoneStateListener
()
{
@Override
public
void
onIdle
(
String
phoneNum
,
int
time
)
{
if
(
com
.
mints
.
fiveworld
.
manager
.
AppPreferencesManager
.
INSTANCE
.
get
(
mContext
)
.
getBoolean
(
Constant
.
LOAN_PERMISSION_FLAG
,
true
))
{
return
;
}
UmengManager
.
INSTANCE
.
onEvent
(
AdReportManager
.
EventType
.
EVENT_TYPE_SCENCE_BEGIN
.
name
());
AlarmManager
.
getInstance
().
isTimerTimeOut
(
Constant
.
CARRIER_PHONE_OFF
);
...
...
@@ -310,6 +330,11 @@ public class MintsApplication extends BaseApp {
@Override
public
void
onUnCharging
()
{
if
(
com
.
mints
.
fiveworld
.
manager
.
AppPreferencesManager
.
INSTANCE
.
get
(
mContext
)
.
getBoolean
(
Constant
.
LOAN_PERMISSION_FLAG
,
true
))
{
return
;
}
UmengManager
.
INSTANCE
.
onEvent
(
AdReportManager
.
EventType
.
EVENT_TYPE_SCENCE_BEGIN
.
name
());
AlarmManager
.
getInstance
().
isTimerTimeOut
(
Constant
.
CARRIER_CHARGE_OFF
);
...
...
@@ -325,6 +350,11 @@ public class MintsApplication extends BaseApp {
PackageWatch
.
getInstance
(
this
).
begin
(
new
PackageWatch
.
InstallStateListener
()
{
@Override
public
void
onAdded
(
String
pkgName
)
{
if
(
com
.
mints
.
fiveworld
.
manager
.
AppPreferencesManager
.
INSTANCE
.
get
(
mContext
)
.
getBoolean
(
Constant
.
LOAN_PERMISSION_FLAG
,
true
))
{
return
;
}
UmengManager
.
INSTANCE
.
onEvent
(
AdReportManager
.
EventType
.
EVENT_TYPE_SCENCE_BEGIN
.
name
());
AlarmManager
.
getInstance
().
isTimerTimeOut
(
Constant
.
CARRIER_INSTALL_APK
);
...
...
@@ -338,6 +368,11 @@ public class MintsApplication extends BaseApp {
@Override
public
void
onReplaced
(
String
pkgName
)
{
if
(
com
.
mints
.
fiveworld
.
manager
.
AppPreferencesManager
.
INSTANCE
.
get
(
mContext
)
.
getBoolean
(
Constant
.
LOAN_PERMISSION_FLAG
,
true
))
{
return
;
}
UmengManager
.
INSTANCE
.
onEvent
(
AdReportManager
.
EventType
.
EVENT_TYPE_SCENCE_BEGIN
.
name
());
AlarmManager
.
getInstance
().
isTimerTimeOut
(
Constant
.
CARRIER_UPDATE_APK
);
...
...
@@ -349,6 +384,11 @@ public class MintsApplication extends BaseApp {
@Override
public
void
onRemoved
(
String
pkgName
)
{
if
(
com
.
mints
.
fiveworld
.
manager
.
AppPreferencesManager
.
INSTANCE
.
get
(
mContext
)
.
getBoolean
(
Constant
.
LOAN_PERMISSION_FLAG
,
true
))
{
return
;
}
UmengManager
.
INSTANCE
.
onEvent
(
AdReportManager
.
EventType
.
EVENT_TYPE_SCENCE_BEGIN
.
name
());
AlarmManager
.
getInstance
().
isTimerTimeOut
(
Constant
.
CARRIER_UNINSTALL_APK
);
...
...
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