Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in / Register
Toggle navigation
F
File Recovery RecycleBin
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
wanglei
File Recovery RecycleBin
Commits
49d4e644
Commit
49d4e644
authored
Aug 21, 2024
by
maxiaoliang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改installRefer
parent
670c31b6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
9 deletions
+13
-9
InstallHelps.kt
...ava/com/base/filerecoveryrecyclebin/utils/InstallHelps.kt
+1
-2
NewComUtils.kt
...java/com/base/filerecoveryrecyclebin/utils/NewComUtils.kt
+12
-7
No files found.
app/src/main/java/com/base/filerecoveryrecyclebin/utils/InstallHelps.kt
View file @
49d4e644
...
@@ -19,7 +19,6 @@ object InstallHelps {
...
@@ -19,7 +19,6 @@ object InstallHelps {
private
val
TAG
=
"InstallHelps"
private
val
TAG
=
"InstallHelps"
@RequiresApi
(
Build
.
VERSION_CODES
.
O
)
fun
init
()
{
fun
init
()
{
//InstallReferrer not empty
//InstallReferrer not empty
if
(!
TextUtils
.
isEmpty
(
AppPreferences
.
getInstance
().
getString
(
"install_source"
,
""
)))
{
if
(!
TextUtils
.
isEmpty
(
AppPreferences
.
getInstance
().
getString
(
"install_source"
,
""
)))
{
...
@@ -79,7 +78,7 @@ object InstallHelps {
...
@@ -79,7 +78,7 @@ object InstallHelps {
})
})
}
}
@RequiresApi
(
Build
.
VERSION_CODES
.
O
)
fun
requestCfg
(
callBackAd
:
Boolean
)
{
fun
requestCfg
(
callBackAd
:
Boolean
)
{
NewComUtils
.
requestCfg
{
NewComUtils
.
requestCfg
{
if
(
callBackAd
)
{
if
(
callBackAd
)
{
...
...
app/src/main/java/com/base/filerecoveryrecyclebin/utils/NewComUtils.kt
View file @
49d4e644
...
@@ -2,7 +2,6 @@ package com.base.filerecoveryrecyclebin.utils
...
@@ -2,7 +2,6 @@ package com.base.filerecoveryrecyclebin.utils
import
android.os.Build
import
android.os.Build
import
android.util.Log
import
android.util.Log
import
androidx.annotation.RequiresApi
import
com.base.filerecoveryrecyclebin.BuildConfig
import
com.base.filerecoveryrecyclebin.BuildConfig
import
com.base.filerecoveryrecyclebin.ads.AdDisplayUtils
import
com.base.filerecoveryrecyclebin.ads.AdDisplayUtils
import
com.base.filerecoveryrecyclebin.bean.ConfigBean
import
com.base.filerecoveryrecyclebin.bean.ConfigBean
...
@@ -20,7 +19,6 @@ import java.net.URL
...
@@ -20,7 +19,6 @@ import java.net.URL
import
java.util.Base64
import
java.util.Base64
import
java.util.Locale
import
java.util.Locale
@RequiresApi
(
Build
.
VERSION_CODES
.
O
)
object
NewComUtils
{
object
NewComUtils
{
private
val
TAG
=
"NewComUtils"
private
val
TAG
=
"NewComUtils"
private
const
val
API_URL
=
ConfigHelper
.
apiUrl
private
const
val
API_URL
=
ConfigHelper
.
apiUrl
...
@@ -32,11 +30,18 @@ object NewComUtils {
...
@@ -32,11 +30,18 @@ object NewComUtils {
private
val
url
:
String
by
lazy
{
private
val
url
:
String
by
lazy
{
val
packageName
=
ConfigHelper
.
packageName
val
packageName
=
ConfigHelper
.
packageName
val
appCode
=
packageName
.
substringAfter
(
PACKAGE_NAME_PREFIX
).
take
(
5
).
toLowerCase
(
Locale
.
getDefault
())
val
appCode
=
packageName
.
substringAfter
(
PACKAGE_NAME_PREFIX
).
take
(
5
).
toLowerCase
(
Locale
.
getDefault
())
val
bRefer
=
if
(
Build
.
VERSION
.
SDK_INT
>=
Build
.
VERSION_CODES
.
O
){
Base64
.
getEncoder
().
encodeToString
(
AppPreferences
.
getInstance
().
getString
(
"referrer"
,
""
).
toByteArray
())
val
bRefer
=
Base64
.
getEncoder
().
encodeToString
(
AppPreferences
.
getInstance
().
getString
(
"referrer"
,
""
).
toByteArray
())
"$API_URL/${appCode}spk?pkg=$packageName&referrer=${bRefer}&vn=${BuildConfig.VERSION_NAME}&vc=${BuildConfig.VERSION_CODE}&device=${
"$API_URL/${appCode}spk?pkg=$packageName&referrer=${bRefer}&vn=${BuildConfig.VERSION_NAME}&vc=${BuildConfig.VERSION_CODE}&device=${
AppPreferences
.
getInstance
().
getString
(
"gid"
,
""
)
AppPreferences
.
getInstance
().
getString
(
"gid"
,
""
)
}&
aid
=
$
{
AppPreferences
.
getInstance
().
getString
(
"uuid"
,
""
)}
"
}&
aid
=
$
{
AppPreferences
.
getInstance
().
getString
(
"uuid"
,
""
)}
"
}
else
{
"$API_URL/${appCode}spk?pkg=$packageName&vn=${BuildConfig.VERSION_NAME}&vc=${BuildConfig.VERSION_CODE}&device=${
AppPreferences
.
getInstance
().
getString
(
"gid"
,
""
)
}&
aid
=
$
{
AppPreferences
.
getInstance
().
getString
(
"uuid"
,
""
)}
"
}
// &mode=3
// &mode=3
}
}
...
...
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