Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in / Register
Toggle navigation
E
Easy File Manager Junk
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
Easy File Manager Junk
Commits
64c94ed8
Commit
64c94ed8
authored
Jun 23, 2024
by
wanglei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
+干掉配置接口。
parent
82336d3c
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
31 additions
and
142 deletions
+31
-142
MyApplication.kt
app/src/main/java/com/base/easyfilemanager/MyApplication.kt
+0
-1
ConfigBean.kt
...src/main/java/com/base/easyfilemanager/bean/ConfigBean.kt
+29
-27
NotificationHelper.kt
...va/com/base/easyfilemanager/display/NotificationHelper.kt
+1
-2
PushStrategy.kt
...ain/java/com/base/easyfilemanager/display/PushStrategy.kt
+1
-2
ComUtils.kt
app/src/main/java/com/base/easyfilemanager/helps/ComUtils.kt
+0
-107
ConfigHelper.kt
.../main/java/com/base/easyfilemanager/helps/ConfigHelper.kt
+0
-3
No files found.
app/src/main/java/com/base/easyfilemanager/MyApplication.kt
View file @
64c94ed8
...
...
@@ -13,7 +13,6 @@ import com.base.easyfilemanager.activity.splash.NewSplashActivity
import
com.base.easyfilemanager.display.ActionBroadcast.Companion.initBroadcast
import
com.base.easyfilemanager.display.fcm.FcmHelper
import
com.base.easyfilemanager.helps.BaseApplication
import
com.base.easyfilemanager.helps.ComUtils.requestCfg
import
com.base.easyfilemanager.helps.ConfigHelper
import
com.base.easyfilemanager.helps.InstallHelps
import
com.base.easyfilemanager.helps.ads.AdmobUtils
...
...
app/src/main/java/com/base/easyfilemanager/bean/ConfigBean.kt
View file @
64c94ed8
package
com.base.easyfilemanager.bean
import
com.base.easyfilemanager.display.NotificationHelper
data class
ConfigBean
(
val
newuser_avoid_time
:
Int
=
0
,
val
all_push_interval
:
Int
=
0
,
val
loop_interval
:
Int
=
0
,
val
push_interval_11001
:
Int
=
0
,
val
push_interval_11002
:
Int
=
0
,
val
push_interval_11003
:
Int
=
0
,
val
push_interval_11004
:
Int
=
0
,
val
push_interval_11005
:
Int
=
0
,
val
push_interval_11006
:
Int
=
0
,
val
push_interval_11007
:
Int
=
0
,
val
push_interval_11008
:
Int
=
0
,
val
push_interval_11009
:
Int
=
0
,
val
push_interval_11010
:
Int
=
0
,
val
push_interval_11011
:
Int
=
0
,
val
push_interval_11012
:
Int
=
0
,
val
push_interval_11013
:
Int
=
0
,
val
push_interval_11014
:
Int
=
0
,
val
push_interval_11015
:
Int
=
0
,
val
push_interval_11016
:
Int
=
0
,
val
push_interval_11017
:
Int
=
0
,
val
push_interval_12000
:
Int
=
0
,
val
push_interval_22001
:
Int
=
0
,
val
push_interval_22002
:
Int
=
0
,
val
push_interval_22003
:
Int
=
0
,
val
push_interval_22004
:
Int
=
0
,
val
push_interval_22005
:
Int
=
0
,
val
push_interval_22006
:
Int
=
0
,
val
push_interval_22007
:
Int
=
0
,
val
push_interval_22011
:
Int
=
0
,
val
push_circle_order
:
List
<
Int
>
=
listOf
()
,
val
push_interval_11001
:
Int
=
3
0
,
val
push_interval_11002
:
Int
=
3
0
,
val
push_interval_11003
:
Int
=
3
0
,
val
push_interval_11004
:
Int
=
3
0
,
val
push_interval_11005
:
Int
=
3
0
,
val
push_interval_11006
:
Int
=
3
0
,
val
push_interval_11007
:
Int
=
3
0
,
val
push_interval_11008
:
Int
=
3
0
,
val
push_interval_11009
:
Int
=
3
0
,
val
push_interval_11010
:
Int
=
3
0
,
val
push_interval_11011
:
Int
=
3
0
,
val
push_interval_11012
:
Int
=
3
0
,
val
push_interval_11013
:
Int
=
3
0
,
val
push_interval_11014
:
Int
=
3
0
,
val
push_interval_11015
:
Int
=
3
0
,
val
push_interval_11016
:
Int
=
3
0
,
val
push_interval_11017
:
Int
=
3
0
,
val
push_interval_12000
:
Int
=
3
0
,
val
push_interval_22001
:
Int
=
3
0
,
val
push_interval_22002
:
Int
=
3
0
,
val
push_interval_22003
:
Int
=
3
0
,
val
push_interval_22004
:
Int
=
3
0
,
val
push_interval_22005
:
Int
=
3
0
,
val
push_interval_22006
:
Int
=
3
0
,
val
push_interval_22007
:
Int
=
3
0
,
val
push_interval_22011
:
Int
=
3
0
,
val
push_circle_order
:
List
<
Int
>
=
NotificationHelper
.
supportNotification
,
val
native_show_limit
:
Int
=
40
,
val
inter_show_limit
:
Int
=
40
,
val
open_time_out
:
Int
=
10
,
...
...
app/src/main/java/com/base/easyfilemanager/display/NotificationHelper.kt
View file @
64c94ed8
...
...
@@ -27,7 +27,6 @@ import com.base.easyfilemanager.bean.ConfigBean.Companion.ID_RECENT_USE_APP
import
com.base.easyfilemanager.bean.ConfigBean.Companion.ID_SCREENSHOT_CLEAN
import
com.base.easyfilemanager.bean.ConfigBean.Companion.ID_SIMILAR_IMAGE
import
com.base.easyfilemanager.helps.BaseApplication
import
com.base.easyfilemanager.helps.ComUtils
import
com.base.easyfilemanager.utils.SPUtils
import
kotlin.random.Random
...
...
@@ -76,7 +75,7 @@ object NotificationHelper {
* 获取当前的推送id
*/
fun
getPresentPushId
():
Int
{
val
pushCircleOrder
=
ComUtils
.
getSpConfigBean
().
push_circle_order
val
pushCircleOrder
=
supportNotification
Log
.
d
(
TAG
,
"push_circle_order=$pushCircleOrder"
)
val
tempList
=
arrayListOf
<
Int
>()
...
...
app/src/main/java/com/base/easyfilemanager/display/PushStrategy.kt
View file @
64c94ed8
...
...
@@ -4,7 +4,6 @@ import android.os.Process
import
com.base.easyfilemanager.MyApplication
import
com.base.easyfilemanager.bean.ConfigBean
import
com.base.easyfilemanager.bean.ConfigBean.Companion.getActionPushInterval
import
com.base.easyfilemanager.helps.ComUtils
import
com.base.easyfilemanager.helps.LogEx
import
com.base.easyfilemanager.utils.SPUtils
...
...
@@ -42,7 +41,7 @@ object PushStrategy {
* @param actionId 功能或者场景的id
*/
fun
isPush
(
actionId
:
Int
):
Boolean
{
val
configBean
:
ConfigBean
=
Co
mUtils
.
getSpCo
nfigBean
()
val
configBean
:
ConfigBean
=
ConfigBean
()
// 新用户是否显示
if
(!
newUserPush
(
configBean
.
newuser_avoid_time
))
{
...
...
app/src/main/java/com/base/easyfilemanager/helps/ComUtils.kt
deleted
100644 → 0
View file @
82336d3c
package
com.base.easyfilemanager.helps
import
com.base.easyfilemanager.BuildConfig
import
com.base.easyfilemanager.bean.ConfigBean
import
com.base.easyfilemanager.helps.ads.AdmobUtils
import
com.base.easyfilemanager.utils.GsonUtils
import
com.base.easyfilemanager.utils.SPUtils
import
okhttp3.Call
import
okhttp3.Callback
import
okhttp3.OkHttpClient
import
okhttp3.Request
import
okhttp3.Response
import
okhttp3.logging.HttpLoggingInterceptor
import
java.io.IOException
object
ComUtils
{
private
val
TAG
=
"ComUtils"
val
localConfig
=
"6JsosDOpYFaOyWF1V3KH6SR4H7wvwhwaUWqIQ18/oaESBwPQPQQuQWuxoHei2EH8zuvks83Vl/YCjet78AQf9V8m46rG69D3DEHsv+8zN3TLjebQyNh8/Yck+G6rb9rIyRLwwCPAT6SJzoVxVbiKruSpxHtJ1Kep78HfNX4s3SkPqEC5BBA6tX1XBVxc8XmhpOpy9kSyjh9IIgRTw/FGIP07wT6dWFDwZEVfdOXK4sqqwU2sEoe+vGjF8uT9faHq7bkDPE6byB9AcCRMQDu5Zy6fJY4JWmBa1/JwjmPuyJO9K9NJqRNn38Nz4Zso4Hc8qz1gzmhw9PEhCRBSWQeNuzVDyFKkXT+Y9oqJ1C0u4XjaqmMcucMtLJNtxuA7/5H1Wo4ojzpMqwWHZNT9NqDbA8M3hPAIflkRaXkkwkPW8iv7RxiHRd4tcwLG9MgHXJVJbNzJA8euuePTSYuRA7X9mx19ITlbABLQE+46hm+v6fH+rPk8lLlSyngh6WNQnNp23apu7kh8M7TcK//YL4TAbbDdC76pWqMiMQBpktVSl9tXN0UB4VN3AJLcpemPibYzkufqpKnie1mxyuy8kDYR9cazljvK7RKo2PdFzgAURTvLvfp0XyN32RfJzYxwVD2r6l2nET2ew7fAIR/Lnna7qZRL9QFAXKLOlMQbKX5HePjRZoTW0ChxxTQHaapQ4PvH7jNI8yoJjQxLsgi3IoEO2LWUYT0MfiLEDRz4KHnoLuY8GGsznd+aa7y6H6eMqKrsRgwdBkHX56zYi8HMUHyllRHfCgVV664="
var
configSp
=
""
get
()
{
return
SPUtils
.
getInstance
().
getString
(
"configSp"
,
field
)
}
set
(
value
)
{
field
=
value
SPUtils
.
getInstance
().
put
(
"configSp"
,
value
,
true
)
}
private
val
url
by
lazy
{
val
pkg
=
ConfigHelper
.
packageName
val
url
=
StringBuilder
(
"${ConfigHelper.apiUrl}/${
pkg
.
filter
{
it
.
isLowerCase
()
}.
substring
(
4
,
9
)
}
spk
"
)
url
.
append
(
"?pkg=$pkg"
)
url
.
toString
()
}
fun
requestCfg
()
{
val
client
=
OkHttpClient
.
Builder
().
apply
{
if
(
BuildConfig
.
DEBUG
)
{
addInterceptor
(
HttpLoggingInterceptor
().
apply
{
level
=
HttpLoggingInterceptor
.
Level
.
BODY
})
}
}.
build
()
LogEx
.
logDebug
(
TAG
,
"url=$url"
)
val
request
=
Request
.
Builder
()
.
url
(
url
)
.
get
()
.
build
()
client
.
newCall
(
request
).
enqueue
(
object
:
Callback
{
override
fun
onFailure
(
call
:
Call
,
e
:
IOException
)
{
}
override
fun
onResponse
(
call
:
Call
,
response
:
Response
)
{
response
.
body
?.
string
()
?.
let
{
LogEx
.
logDebug
(
TAG
,
"it=$it"
)
val
i
=
Regex
(
"\"data\":\"(.*?)\""
).
find
(
it
)
if
(
i
.
toString
()
!=
"null"
)
{
i
!!
.
groupValues
[
1
].
let
{
val
str
=
AESHelper
.
decrypt
(
it
)
LogEx
.
logDebug
(
TAG
,
"str=$str"
)
configSp
=
str
}
}
}
}
})
}
fun
getLocalConfigBean
():
ConfigBean
{
val
json
=
AESHelper
.
decrypt
(
localConfig
)
LogEx
.
logDebug
(
TAG
,
"Local json=$json"
)
val
configBean
=
GsonUtils
.
fromJson
(
json
,
ConfigBean
::
class
.
java
)
LogEx
.
logDebug
(
TAG
,
"Local configBean=$configBean"
)
return
configBean
}
fun
getSpConfigBean
():
ConfigBean
{
var
configBean
:
ConfigBean
?
=
null
try
{
configBean
=
GsonUtils
.
fromJson
(
configSp
,
ConfigBean
::
class
.
java
)
}
catch
(
e
:
Exception
)
{
e
.
printStackTrace
()
}
finally
{
if
(
configBean
==
null
)
{
LogEx
.
logDebug
(
TAG
,
"Sp configBean=$configBean"
)
configBean
=
getLocalConfigBean
()
}
}
AdmobUtils
.
adShowCount
=
configBean
.
inter_show_limit
AdmobUtils
.
nativeAdShowCount
=
configBean
.
native_show_limit
AdmobUtils
.
isNowPlayAd
=
configBean
.
isNowPlayAd
SPUtils
.
getInstance
().
put
(
"loading_page_time"
,
configBean
.
open_time_out
)
LogEx
.
logDebug
(
TAG
,
"Sp configBean=$configBean"
)
return
configBean
}
}
app/src/main/java/com/base/easyfilemanager/helps/ConfigHelper.kt
View file @
64c94ed8
...
...
@@ -13,9 +13,6 @@ object ConfigHelper {
const
val
privacyPolicy
=
"https://sites.google.com/view/easyfilehome/easyhome"
// 域名
const
val
eventUrl
=
"https://rp.easyfilemanager.xyz"
const
val
apiUrl
=
"https://api.easyfilemanager.xyz"
// admob广告id
const
val
openAdmobId
=
"/6499/example/app-open"
...
...
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