Browse Source

1.退出登录时清理应用内存。

20241218TB223FC(测试jar包)
wangwanlei 8 months ago
parent
commit
e32088265e

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

@@ -1488,8 +1488,6 @@ class MainActivity : BaseActivity<MainViewModel, ActivityMainBinding>(),Download
1488 1488
                 LogShow("关闭任务")
1489 1489
             }
1490 1490
             Const.ACCOUNTLOGINOUTSUCESS->{
1491
-                val appList = AppUtils.GetAppList(this@MainActivity)
1492
-                StrategyUtils.clearMemory(this@MainActivity, appList)
1493 1491
                 loginOutSucess()
1494 1492
             }
1495 1493
             Const.STARTLOCATION->{
@@ -1910,6 +1908,8 @@ class MainActivity : BaseActivity<MainViewModel, ActivityMainBinding>(),Download
1910 1908
     }
1911 1909
 
1912 1910
     private fun loginOutSucess() {
1911
+        val appList = AppUtils.GetAppList(this@MainActivity)
1912
+        StrategyUtils.clearMemory(this@MainActivity, appList)
1913 1913
         spUtils.setParam(Const.DISABLEPAD,false)
1914 1914
         WorkManager.getInstance(this).cancelAllWork()
1915 1915
         spUtils.clearData()

Loading…
Cancel
Save