Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in / Register
Toggle navigation
E
Easy File Manager
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
Commits
003faa1b
Commit
003faa1b
authored
Jun 24, 2024
by
wanglei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
移除混淆功能
parent
157d8d2c
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
3 additions
and
1956 deletions
+3
-1956
proguard.py
app/proguard.py
+0
-1815
MyApplication.kt
app/src/main/java/com/base/easyfilemanager/MyApplication.kt
+1
-14
AESHelper.kt
...src/main/java/com/base/easyfilemanager/helps/AESHelper.kt
+0
-60
AESTextView.kt
...c/main/java/com/base/easyfilemanager/helps/AESTextView.kt
+0
-16
BarUtils.kt
app/src/main/java/com/base/easyfilemanager/helps/BarUtils.kt
+2
-2
ConfigHelper.kt
.../main/java/com/base/easyfilemanager/helps/ConfigHelper.kt
+0
-7
KotlinExt.kt
...src/main/java/com/base/easyfilemanager/helps/KotlinExt.kt
+0
-42
No files found.
app/proguard.py
deleted
100644 → 0
View file @
157d8d2c
This diff is collapsed.
Click to expand it.
app/src/main/java/com/base/easyfilemanager/MyApplication.kt
View file @
003faa1b
...
...
@@ -24,20 +24,7 @@ class MyApplication : BaseApplication() {
fun
initApp
()
{
if
(
ConfigHelper
.
ifAgreePrivacy
)
{
MobileAds
.
initialize
(
this
)
{
initializationStatus
->
val
statusMap
=
initializationStatus
.
adapterStatusMap
for
(
adapterClass
in
statusMap
.
keys
)
{
val
status
=
statusMap
[
adapterClass
]
Log
.
d
(
"MyApp"
,
String
.
format
(
"Adapter name: %s, Description: %s, Latency: %d"
,
adapterClass
,
status
!!
.
description
,
status
.
latency
)
)
}
}
MobileAds
.
initialize
(
this
)
{
initializationStatus
->
}
}
initLifeListener
()
}
...
...
app/src/main/java/com/base/easyfilemanager/helps/AESHelper.kt
deleted
100644 → 0
View file @
157d8d2c
package
com.base.easyfilemanager.helps
import
android.util.Base64
import
java.security.SecureRandom
import
javax.crypto.Cipher
import
javax.crypto.spec.GCMParameterSpec
import
javax.crypto.spec.SecretKeySpec
object
AESHelper
{
private
const
val
aesKey
=
"bt8n2r8wdqk30wcu"
private
val
cipher
by
lazy
{
Cipher
.
getInstance
(
"AES/GCM/NoPadding"
)
}
fun
encrypt
(
content
:
String
):
String
{
try
{
val
iv
=
ByteArray
(
12
).
apply
{
SecureRandom
().
nextBytes
(
this
)
}
val
contentBytes
=
content
.
toByteArray
(
Charsets
.
UTF_8
)
val
params
=
GCMParameterSpec
(
128
,
iv
)
cipher
.
init
(
Cipher
.
ENCRYPT_MODE
,
secretKey
,
params
)
val
encryptData
=
cipher
.
doFinal
(
contentBytes
)
assert
(
encryptData
.
size
==
contentBytes
.
size
+
16
)
val
message
=
ByteArray
(
12
+
contentBytes
.
size
+
16
)
System
.
arraycopy
(
iv
,
0
,
message
,
0
,
12
)
System
.
arraycopy
(
encryptData
,
0
,
message
,
12
,
encryptData
.
size
)
return
String
(
Base64
.
encode
(
message
,
Base64
.
NO_WRAP
),
Charsets
.
UTF_8
)
}
catch
(
_
:
Exception
)
{
}
return
content
}
@Synchronized
fun
decrypt
(
content
:
String
):
String
{
try
{
val
con
=
content
.
replace
(
" "
.
toRegex
(),
"+"
)
val
contentByte
=
Base64
.
decode
(
con
,
Base64
.
NO_WRAP
)
require
(
contentByte
.
size
>=
12
+
16
)
val
params
=
GCMParameterSpec
(
128
,
contentByte
,
0
,
12
)
cipher
.
init
(
Cipher
.
DECRYPT_MODE
,
secretKey
,
params
)
val
decryptData
=
cipher
.
doFinal
(
contentByte
,
12
,
contentByte
.
size
-
12
)
return
String
(
decryptData
,
Charsets
.
UTF_8
)
}
catch
(
_
:
Exception
)
{
}
return
content
}
private
val
secretKey
by
lazy
{
SecretKeySpec
(
aesKey
.
toByteArray
(),
"AES"
)
}
}
\ No newline at end of file
app/src/main/java/com/base/easyfilemanager/helps/AESTextView.kt
deleted
100644 → 0
View file @
157d8d2c
package
com.base.easyfilemanager.helps
import
android.content.Context
import
android.util.AttributeSet
import
com.base.easyfilemanager.helps.KotlinExt.decode
import
com.noober.background.view.BLTextView
class
AESTextView
@JvmOverloads
constructor
(
context
:
Context
,
attrs
:
AttributeSet
?
=
null
)
:
BLTextView
(
context
,
attrs
)
{
override
fun
setText
(
text
:
CharSequence
?,
type
:
BufferType
?)
{
super
.
setText
(
text
?.
toString
()
?.
run
{
decode
().
takeIf
{
it
!=
this
}
}
?:
text
,
type
)
}
}
\ No newline at end of file
app/src/main/java/com/base/easyfilemanager/helps/BarUtils.kt
View file @
003faa1b
package
com.base.easyfilemanager.helps
//noinspection SuspiciousImport
import
android.R
import
android.annotation.SuppressLint
import
android.app.Activity
import
android.content.Context
...
...
@@ -73,7 +72,7 @@ object BarUtils {
private
fun
applyStatusBarColor
(
window
:
Window
,
color
:
Int
,
isDecor
:
Boolean
):
View
{
val
parent
=
if
(
isDecor
)
window
.
decorView
as
ViewGroup
else
(
window
.
findViewById
<
View
>(
R
.
id
.
content
)
as
ViewGroup
)
if
(
isDecor
)
window
.
decorView
as
ViewGroup
else
(
window
.
findViewById
<
View
>(
android
.
R
.
id
.
content
)
as
ViewGroup
)
var
fakeStatusBarView
=
parent
.
findViewWithTag
<
View
>(
TAG_STATUS_BAR
)
if
(
fakeStatusBarView
!=
null
)
{
...
...
@@ -102,6 +101,7 @@ object BarUtils {
// status bar
///////////////////////////////////////////////////////////////////////////
private
const
val
TAG_STATUS_BAR
=
"TAG_STATUS_BAR"
@SuppressLint
(
"DiscouragedApi"
,
"InternalInsetResource"
)
fun
getStatusBarHeight
():
Int
{
val
resources
=
Resources
.
getSystem
()
...
...
app/src/main/java/com/base/easyfilemanager/helps/ConfigHelper.kt
View file @
003faa1b
...
...
@@ -6,13 +6,6 @@ import com.base.easyfilemanager.utils.SPUtils
object
ConfigHelper
{
var
gid
=
""
var
isOpenNotification
=
false
// 域名
const
val
eventUrl
=
"http://test"
const
val
apiUrl
=
"http://test"
// admob广告id
const
val
openAdmobId
=
"/6499/example/app-open"
...
...
app/src/main/java/com/base/easyfilemanager/helps/KotlinExt.kt
View file @
003faa1b
package
com.base.easyfilemanager.helps
import
android.view.View
import
java.text.SimpleDateFormat
import
java.util.Locale
object
KotlinExt
{
private
val
aesMap
=
mutableMapOf
<
Int
,
String
>()
fun
Int
.
string
(
vararg
arg
:
Any
)
=
try
{
(
aesMap
[
this
]
?:
BaseApplication
.
context
.
getString
(
this
).
decode
()).
run
{
aesMap
[
this
@string
]
=
this
String
.
format
(
this
,
*
arg
)
}
}
catch
(
_
:
Exception
)
{
""
}
fun
String
.
decode
()
=
AESHelper
.
decrypt
(
this
)
.
replace
(
"\\r"
,
"\r"
)
.
replace
(
"\\n"
,
"\n"
)
.
replace
(
"\\'"
,
"'"
)
.
replace
(
"\\\""
,
"\""
)
.
replace
(
"\\?"
,
"?"
)
.
replace
(
"&"
,
"&"
)
fun
Collection
<
View
>.
setOnClickListener
(
listener
:
(
View
)
->
Unit
)
{
this
.
forEach
{
it
.
setOnClickListener
(
listener
)
}
}
fun
View
.
setTrackedOnClickListener
(
action
:
(
view
:
View
)
->
Unit
)
{
setOnClickListener
{
action
(
this
)
var
view
:
View
?
=
this
while
(
view
!=
null
)
{
try
{
break
}
catch
(
_
:
Exception
)
{
view
=
view
.
parent
as
?
View
}
}
}
}
fun
Number
.
toFormatSize
(
count
:
Int
=
1
):
String
{
var
suffix
=
"B"
var
fSize
=
this
.
toDouble
()
...
...
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