Browse Source

1.在Onreume时重置AppSocketService.lastPkgName,方便统计应用打开记录。

master
wangwanlei 9 months ago
parent
commit
5fd0fd84f9
1 changed files with 2 additions and 2 deletions
  1. 2
    2
      app/src/main/java/com/xhly/manageapp/ui/MainActivity.kt

+ 2
- 2
app/src/main/java/com/xhly/manageapp/ui/MainActivity.kt View File

82
         }
82
         }
83
         onBackPressedDispatcher.addCallback {
83
         onBackPressedDispatcher.addCallback {
84
           lifecycleScope.launch {
84
           lifecycleScope.launch {
85
-              var logService = RetrofitService.create<LogService>()
86
-              logService.postListApp()
85
+
87
           }
86
           }
88
             //屏蔽返回
87
             //屏蔽返回
89
         }
88
         }
92
 
91
 
93
     override fun onResume() {
92
     override fun onResume() {
94
         super.onResume()
93
         super.onResume()
94
+        AppSocketService.lastPkgName=""
95
         getAppInfo()
95
         getAppInfo()
96
         useStrategy()
96
         useStrategy()
97
         if (!isServiceON(this,AppSocketService::class.java.name)){
97
         if (!isServiceON(this,AppSocketService::class.java.name)){

Loading…
Cancel
Save