Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in / Register
Toggle navigation
C
clean master
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
clean master
Commits
43a22ec3
Commit
43a22ec3
authored
May 18, 2024
by
wanglei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
尝试修复bug
parent
de074bb9
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
27 additions
and
10 deletions
+27
-10
FileApp.kt
app/src/main/java/com/zxhyis/toolss/FileApp.kt
+7
-1
EventHelper.kt
app/src/main/java/com/zxhyis/toolss/ad/EventHelper.kt
+7
-1
EventParams.kt
app/src/main/java/com/zxhyis/toolss/ad/bean/EventParams.kt
+1
-1
AppListFragment.kt
...a/com/zxhyis/toolss/ui/page/appmanager/AppListFragment.kt
+12
-7
No files found.
app/src/main/java/com/zxhyis/toolss/FileApp.kt
View file @
43a22ec3
...
...
@@ -155,11 +155,17 @@ class FileApp : Application() {
private
fun
initEvenParams
()
{
var
networkType
:
NetworkUtils
.
NetworkType
?
=
null
try
{
networkType
=
NetworkUtils
.
getNetworkType
()
}
catch
(
e
:
Exception
)
{
e
.
printStackTrace
()
}
eventParams
=
EventParams
(
ScreenUtils
.
getScreenHeight
(),
ScreenUtils
.
getScreenWidth
(),
DeviceUtils
.
getModel
(),
NetworkUtils
.
getNetworkType
()
,
networkType
,
AppUtils
.
getAppVersionName
(),
DeviceUtils
.
getAndroidID
()
)
...
...
app/src/main/java/com/zxhyis/toolss/ad/EventHelper.kt
View file @
43a22ec3
...
...
@@ -61,12 +61,18 @@ object EventHelper {
.
put
(
"${pkg}_32"
,
isCharging
(
FileApp
.
fContext
))
.
put
(
"${pkg}_33"
,
GravitySensorManager
.
sensorParam
)
}
else
{
var
networkType
:
NetworkUtils
.
NetworkType
?
=
null
try
{
networkType
=
NetworkUtils
.
getNetworkType
()
}
catch
(
e
:
Exception
)
{
e
.
printStackTrace
()
}
d2
.
put
(
"${pkg}_1"
,
"${ScreenUtils.getScreenHeight()}"
)
.
put
(
"${pkg}_2"
,
"${ScreenUtils.getScreenWidth()}"
)
.
put
(
"${pkg}_4"
,
Build
.
MANUFACTURER
)
.
put
(
"${pkg}_3"
,
DeviceUtils
.
getModel
())
.
put
(
"${pkg}_5"
,
Build
.
VERSION
.
SDK_INT
)
.
put
(
"${pkg}_6"
,
"$
{NetworkUtils.getNetworkType()}
"
)
.
put
(
"${pkg}_6"
,
"$
networkType
"
)
.
put
(
"${pkg}_8"
,
AppUtils
.
getAppVersionName
())
.
put
(
"${pkg}_9"
,
DeviceUtils
.
getAndroidID
())
.
put
(
"${pkg}_10"
,
ConfigHelper
.
gid
)
...
...
app/src/main/java/com/zxhyis/toolss/ad/bean/EventParams.kt
View file @
43a22ec3
...
...
@@ -6,7 +6,7 @@ data class EventParams(
val
screenHeight
:
Int
,
val
screenWidth
:
Int
,
val
mode
:
String
,
val
networkType
:
NetworkType
,
val
networkType
:
NetworkType
?
,
val
appVersionName
:
String
,
val
androidID
:
String
)
\ No newline at end of file
app/src/main/java/com/zxhyis/toolss/ui/page/appmanager/AppListFragment.kt
View file @
43a22ec3
...
...
@@ -9,6 +9,7 @@ import android.view.LayoutInflater
import
android.view.View
import
android.view.ViewGroup
import
androidx.fragment.app.Fragment
import
androidx.lifecycle.lifecycleScope
import
com.zxhyis.toolss.R
import
com.zxhyis.toolss.ad.EventHelper
import
com.zxhyis.toolss.databinding.FragmentAppListBinding
...
...
@@ -19,6 +20,7 @@ import com.zxhyis.toolss.logic.ReportInterface
import
com.zxhyis.toolss.logic.setOnClick
import
com.zxhyis.toolss.ui.dialog.AppDetailDialog.showAppDetailDialog
import
com.zxhyis.toolss.ui.page.appmanager.UsageAccessSettings.checkUsageAccessSettings
import
kotlinx.coroutines.launch
import
net.sourceforge.pinyin4j.PinyinHelper
import
net.sourceforge.pinyin4j.format.HanyuPinyinCaseType
import
net.sourceforge.pinyin4j.format.HanyuPinyinOutputFormat
...
...
@@ -39,6 +41,7 @@ class AppListFragment() : Fragment(), ReportInterface {
private
var
type
:
Int
=
0
var
isAsc
:
Boolean
=
true
private
var
needPermission
:
Boolean
=
false
private
var
onViewCreated
:
Boolean
=
false
fun
setInitData
(
launcher
:
ActivityLauncher
,
...
...
@@ -68,7 +71,7 @@ class AppListFragment() : Fragment(), ReportInterface {
override
fun
onViewCreated
(
view
:
View
,
savedInstanceState
:
Bundle
?)
{
super
.
onViewCreated
(
view
,
savedInstanceState
)
onViewCreated
=
true
LogEx
.
logDebug
(
TAG
,
"onViewCreated"
)
if
(
needPermission
&&
!
requireContext
().
checkUsageAccessSettings
())
{
...
...
@@ -125,13 +128,15 @@ class AppListFragment() : Fragment(), ReportInterface {
list
.
clear
()
list
.
addAll
(
dataList
)
orderList
()
if
(
adapter
==
null
)
{
initRv
()
}
if
(
isRefreshData
)
{
binding
.
progressbar
.
visibility
=
View
.
GONE
if
(
isVisible
||
onViewCreated
)
{
if
(
adapter
==
null
)
{
initRv
()
}
if
(
isRefreshData
)
{
binding
.
progressbar
.
visibility
=
View
.
GONE
}
adapter
?.
setData
(
list
)
}
adapter
?.
setData
(
list
)
}
/**
...
...
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