Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in / Register
Toggle navigation
P
PDF Viewer Scanner White ago
Project
Project
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
kuxulei
PDF Viewer Scanner White ago
Commits
3fcf0dcc
Commit
3fcf0dcc
authored
Oct 17, 2024
by
wanglei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
...
parent
98d7c4d7
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
9 deletions
+28
-9
MyApplication.kt
...va/com/base/pdfviewerscannerwhite/helper/MyApplication.kt
+0
-3
SplashActivity.kt
...om/base/pdfviewerscannerwhite/ui/splash/SplashActivity.kt
+12
-6
UmpUtils.kt
...ain/java/com/base/pdfviewerscannerwhite/utils/UmpUtils.kt
+16
-0
No files found.
app/src/main/java/com/base/pdfviewerscannerwhite/helper/MyApplication.kt
View file @
3fcf0dcc
...
...
@@ -45,9 +45,6 @@ class MyApplication : Application() {
var
pdfSplitLanguage
:
String
=
Locale
.
getDefault
().
language
var
wordLanguage
:
String
=
Locale
.
getDefault
().
language
var
umpCanAd
:
Boolean
=
true
@JvmField
var
PAUSED_VALUE
=
0
}
...
...
app/src/main/java/com/base/pdfviewerscannerwhite/ui/splash/SplashActivity.kt
View file @
3fcf0dcc
...
...
@@ -17,7 +17,6 @@ import com.base.pdfviewerscannerwhite.databinding.ActivitySplash2Binding
import
com.base.pdfviewerscannerwhite.fcm.NotificationHoverUtils
import
com.base.pdfviewerscannerwhite.helper.BaseActivity
import
com.base.pdfviewerscannerwhite.helper.MyApplication
import
com.base.pdfviewerscannerwhite.helper.MyApplication.Companion.umpCanAd
import
com.base.pdfviewerscannerwhite.service.StayNotificationService.Companion.startStayNotification
import
com.base.pdfviewerscannerwhite.ui.main.MainActivity
import
com.base.pdfviewerscannerwhite.ui.permission.PermissionActivity
...
...
@@ -26,6 +25,8 @@ import com.base.pdfviewerscannerwhite.utils.BarUtils
import
com.base.pdfviewerscannerwhite.utils.LogEx
import
com.base.pdfviewerscannerwhite.utils.UmpUtils
import
com.base.pdfviewerscannerwhite.utils.UmpUtils.requestUMP
import
com.base.pdfviewerscannerwhite.utils.UmpUtils.umpCalled
import
com.base.pdfviewerscannerwhite.utils.UmpUtils.umpCanAd
import
java.util.Calendar
import
java.util.Locale
import
java.util.concurrent.atomic.AtomicBoolean
...
...
@@ -110,13 +111,18 @@ class SplashActivity : BaseActivity<ActivitySplash2Binding>(), SplashView {
if
(
isHotLaunch
)
{
agreePrivacy
()
}
else
{
if
(!
umpCalled
)
{
UmpUtils
.
callback
=
{
umpCalled
=
true
umpCanAd
=
it
LogEx
.
logDebug
(
TAG
,
"UmpUtils.callback $it"
)
(
application
as
MyApplication
).
initSolarEngine
(
it
)
umpCanAd
=
it
agreePrivacy
()
}
requestUMP
(
this
)
}
else
{
agreePrivacy
()
}
}
}
}
...
...
app/src/main/java/com/base/pdfviewerscannerwhite/utils/UmpUtils.kt
View file @
3fcf0dcc
...
...
@@ -17,6 +17,22 @@ import kotlinx.coroutines.launch
object
UmpUtils
{
var
umpCanAd
=
true
get
()
{
return
AppPreferences
.
getInstance
().
getBoolean
(
"umpCanAd"
,
field
)
}
set
(
value
)
{
field
=
value
AppPreferences
.
getInstance
().
put
(
"umpCanAd"
,
value
,
true
)
}
var
umpCalled
=
false
get
()
{
return
AppPreferences
.
getInstance
().
getBoolean
(
"umpCalled"
,
field
)
}
set
(
value
)
{
field
=
value
AppPreferences
.
getInstance
().
put
(
"umpCalled"
,
value
,
true
)
}
private
fun
Context
.
umpTest
():
ConsentDebugSettings
{
val
debugSettings
=
ConsentDebugSettings
.
Builder
(
this
)
...
...
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