Browse Source

1.修改应用包名。

20241218TB223FC(测试jar包)
wangwanlei 9 months ago
parent
commit
9f992e6357

+ 2
- 2
app/src/main/AndroidManifest.xml View File

45
         android:allowBackup="true"
45
         android:allowBackup="true"
46
         android:appComponentFactory="androidx.core.app.CoreComponentFactory"
46
         android:appComponentFactory="androidx.core.app.CoreComponentFactory"
47
         android:fullBackupContent="@xml/backup_rules"
47
         android:fullBackupContent="@xml/backup_rules"
48
-        android:icon="@mipmap/ic_launcher"
48
+        android:icon="@mipmap/icon_launcher"
49
         android:label="@string/app_name"
49
         android:label="@string/app_name"
50
         android:networkSecurityConfig="@xml/network_security_config"
50
         android:networkSecurityConfig="@xml/network_security_config"
51
-        android:roundIcon="@mipmap/ic_launcher_round"
51
+        android:roundIcon="@mipmap/icon_launcher"
52
         android:supportsRtl="true"
52
         android:supportsRtl="true"
53
         android:theme="@style/MyStyle"
53
         android:theme="@style/MyStyle"
54
         tools:targetApi="30">
54
         tools:targetApi="30">

+ 2
- 7
app/src/main/java/com/xhly/manageapp/AppAdapter.kt View File

1
 package com.xhly.manageapp
1
 package com.xhly.manageapp
2
 
2
 
3
-import android.annotation.SuppressLint
4
-import android.app.ActivityManager
5
 import android.content.Context
3
 import android.content.Context
6
-import android.content.Intent
7
-import android.provider.Settings
8
 import android.view.LayoutInflater
4
 import android.view.LayoutInflater
9
 import android.view.ViewGroup
5
 import android.view.ViewGroup
10
-import android.widget.Toast
11
-import androidx.appcompat.content.res.AppCompatResources
12
 import androidx.recyclerview.widget.RecyclerView
6
 import androidx.recyclerview.widget.RecyclerView
13
 import com.hjq.toast.Toaster
7
 import com.hjq.toast.Toaster
8
+import com.xhkjedu.manageapp.R
9
+import com.xhkjedu.manageapp.databinding.ItemAppBinding
14
 import com.xhly.corelib.Const
10
 import com.xhly.corelib.Const
15
 import com.xhly.corelib.bean.AppInfo
11
 import com.xhly.corelib.bean.AppInfo
16
 import com.xhly.corelib.utils.LogShow
12
 import com.xhly.corelib.utils.LogShow
17
 import com.xhly.corelib.utils.SystemUtil
13
 import com.xhly.corelib.utils.SystemUtil
18
-import com.xhly.manageapp.databinding.ItemAppBinding
19
 import com.xhly.manageapp.utils.StrategyUtils
14
 import com.xhly.manageapp.utils.StrategyUtils
20
 import java.util.Calendar
15
 import java.util.Calendar
21
 
16
 

+ 6
- 6
app/src/main/java/com/xhly/manageapp/ManageApplication.kt View File

31
          */
31
          */
32
         fun addInstallPackageWhiteList(pkgList: ArrayList<String>) {
32
         fun addInstallPackageWhiteList(pkgList: ArrayList<String>) {
33
             if (ModelNameUtils.IS_LianxX505f()) {
33
             if (ModelNameUtils.IS_LianxX505f()) {
34
-                pkgList.add("com.xhly.manageapp")
34
+                pkgList.add(Const.CURRENTAPPPKG)
35
                 csdkManager?.addInstallPackageWhiteList(pkgList)
35
                 csdkManager?.addInstallPackageWhiteList(pkgList)
36
             }
36
             }
37
         }
37
         }
41
          */
41
          */
42
         fun removeInstallPackageWhiteList(pkgList: ArrayList<String>) {
42
         fun removeInstallPackageWhiteList(pkgList: ArrayList<String>) {
43
             if (ModelNameUtils.IS_LianxX505f() && pkgList.size > 0) {
43
             if (ModelNameUtils.IS_LianxX505f() && pkgList.size > 0) {
44
-                pkgList.remove("com.xhly.manageapp")
44
+                pkgList.remove(Const.CURRENTAPPPKG)
45
                 csdkManager?.removeInstallPackageWhiteList(pkgList)
45
                 csdkManager?.removeInstallPackageWhiteList(pkgList)
46
             }
46
             }
47
         }
47
         }
59
 
59
 
60
             }
60
             }
61
             return arrayListOf(
61
             return arrayListOf(
62
-                "com.xhly.manageapp",
62
+                Const.CURRENTAPPPKG,
63
                 "com.xhkjedu.xh_control_appstore"
63
                 "com.xhkjedu.xh_control_appstore"
64
             )
64
             )
65
         }
65
         }
529
             csdkManager = CSDKManager(this)
529
             csdkManager = CSDKManager(this)
530
             addInstallPackageWhiteList(
530
             addInstallPackageWhiteList(
531
                 arrayListOf(
531
                 arrayListOf(
532
-                    "com.xhly.manageapp",
532
+                    Const.CURRENTAPPPKG,
533
                     "com.xhkjedu.xh_control_appstore"
533
                     "com.xhkjedu.xh_control_appstore"
534
                 )
534
                 )
535
             )
535
             )
540
             hideMenuSoftKey(true)
540
             hideMenuSoftKey(true)
541
             enableAccessibility()
541
             enableAccessibility()
542
             setCustomLauncher(
542
             setCustomLauncher(
543
-                "com.xhly.manageapp",
544
-                "com.xhly.manageapp.ui.ManageActivity"
543
+                Const.CURRENTAPPPKG,
544
+                Const.CURRENTAPPPKG+".ui.ManageActivity"
545
             )
545
             )
546
             if (Const.isDebug){
546
             if (Const.isDebug){
547
                 csdkManager?.setPackageEnabled("com.xhly.easystud", true)
547
                 csdkManager?.setPackageEnabled("com.xhly.easystud", true)

+ 2
- 1
app/src/main/java/com/xhly/manageapp/customview/CombinationCardView.kt View File

11
 import android.widget.ImageView
11
 import android.widget.ImageView
12
 import android.widget.LinearLayout
12
 import android.widget.LinearLayout
13
 import android.widget.TextView
13
 import android.widget.TextView
14
-import com.xhly.manageapp.R
14
+import com.xhkjedu.manageapp.R
15
+
15
 
16
 
16
 class CombinationCardView : FrameLayout {
17
 class CombinationCardView : FrameLayout {
17
     private var cv: LinearLayout
18
     private var cv: LinearLayout

+ 1
- 1
app/src/main/java/com/xhly/manageapp/ui/ManageActivity.kt View File

10
 import android.os.Environment
10
 import android.os.Environment
11
 import android.os.Environment.DIRECTORY_DOWNLOADS
11
 import android.os.Environment.DIRECTORY_DOWNLOADS
12
 import android.provider.Settings
12
 import android.provider.Settings
13
+import com.xhkjedu.manageapp.databinding.ActivityManageBinding
13
 import com.xhly.corelib.base.viewmodel.CommonBaseViewModel
14
 import com.xhly.corelib.base.viewmodel.CommonBaseViewModel
14
 import com.xhly.corelib.eventbus.UIEvent
15
 import com.xhly.corelib.eventbus.UIEvent
15
 import com.xhly.corelib.utils.LogShow
16
 import com.xhly.corelib.utils.LogShow
16
 import com.xhly.manageapp.ManageApplication
17
 import com.xhly.manageapp.ManageApplication
17
-import com.xhly.manageapp.databinding.ActivityManageBinding
18
 import java.io.File
18
 import java.io.File
19
 
19
 
20
 
20
 

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

15
 import com.kongzue.dialogx.dialogs.CustomDialog
15
 import com.kongzue.dialogx.dialogs.CustomDialog
16
 import com.kongzue.dialogx.interfaces.OnBindView
16
 import com.kongzue.dialogx.interfaces.OnBindView
17
 import com.tbruyelle.rxpermissions2.RxPermissions
17
 import com.tbruyelle.rxpermissions2.RxPermissions
18
+import com.xhkjedu.manageapp.R
19
+import com.xhkjedu.manageapp.databinding.ActivityLoginBinding
18
 import com.xhly.corelib.Const
20
 import com.xhly.corelib.Const
19
 import com.xhly.corelib.eventbus.UIEvent
21
 import com.xhly.corelib.eventbus.UIEvent
20
 import com.xhly.corelib.utils.AppUtils
22
 import com.xhly.corelib.utils.AppUtils
22
 import com.xhly.corelib.utils.LogShow
24
 import com.xhly.corelib.utils.LogShow
23
 import com.xhly.corelib.utils.SystemUtil
25
 import com.xhly.corelib.utils.SystemUtil
24
 import com.xhly.manageapp.ManageApplication
26
 import com.xhly.manageapp.ManageApplication
25
-import com.xhly.manageapp.R
26
 import com.xhly.manageapp.bean.EventLog
27
 import com.xhly.manageapp.bean.EventLog
27
 import com.xhly.manageapp.bean.login.LoginBean
28
 import com.xhly.manageapp.bean.login.LoginBean
28
 import com.xhly.manageapp.bean.SocketMsgBean
29
 import com.xhly.manageapp.bean.SocketMsgBean
30
 import com.xhly.manageapp.bean.log.LogdOperateBean
31
 import com.xhly.manageapp.bean.log.LogdOperateBean
31
 import com.xhly.manageapp.bean.user.UserBean
32
 import com.xhly.manageapp.bean.user.UserBean
32
 import com.xhly.manageapp.contentprovider.ZSpProvider
33
 import com.xhly.manageapp.contentprovider.ZSpProvider
33
-import com.xhly.manageapp.databinding.ActivityLoginBinding
34
 import com.xhly.manageapp.service.websocket.AppSocket
34
 import com.xhly.manageapp.service.websocket.AppSocket
35
 import com.xhly.manageapp.ui.login.viewmodel.LoginViewModel
35
 import com.xhly.manageapp.ui.login.viewmodel.LoginViewModel
36
 import com.xhly.manageapp.ui.main.activity.MainActivity
36
 import com.xhly.manageapp.ui.main.activity.MainActivity

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

28
 import com.kongzue.dialogx.dialogs.CustomDialog
28
 import com.kongzue.dialogx.dialogs.CustomDialog
29
 import com.kongzue.dialogx.interfaces.OnBindView
29
 import com.kongzue.dialogx.interfaces.OnBindView
30
 import com.tbruyelle.rxpermissions2.RxPermissions
30
 import com.tbruyelle.rxpermissions2.RxPermissions
31
+import com.xhkjedu.manageapp.R
32
+import com.xhkjedu.manageapp.databinding.ActivityMainBinding
31
 import com.xhly.corelib.Const
33
 import com.xhly.corelib.Const
32
 import com.xhly.corelib.bean.AppInfo
34
 import com.xhly.corelib.bean.AppInfo
33
 import com.xhly.corelib.eventbus.UIEvent
35
 import com.xhly.corelib.eventbus.UIEvent
40
 import com.xhly.corelib.utils.SystemUtil
42
 import com.xhly.corelib.utils.SystemUtil
41
 import com.xhly.manageapp.AppAdapter
43
 import com.xhly.manageapp.AppAdapter
42
 import com.xhly.manageapp.ManageApplication
44
 import com.xhly.manageapp.ManageApplication
43
-import com.xhly.manageapp.R
44
 import com.xhly.manageapp.bean.EventLog
45
 import com.xhly.manageapp.bean.EventLog
45
 import com.xhly.manageapp.bean.SocketMsgBean
46
 import com.xhly.manageapp.bean.SocketMsgBean
46
 import com.xhly.manageapp.bean.log.UpdateBean
47
 import com.xhly.manageapp.bean.log.UpdateBean
50
 import com.xhly.manageapp.bean.strategy.StrategyBean
51
 import com.xhly.manageapp.bean.strategy.StrategyBean
51
 import com.xhly.manageapp.bean.user.UserBean
52
 import com.xhly.manageapp.bean.user.UserBean
52
 import com.xhly.manageapp.broadcastreceiver.AppInstallReceiver
53
 import com.xhly.manageapp.broadcastreceiver.AppInstallReceiver
53
-import com.xhly.manageapp.databinding.ActivityMainBinding
54
 import com.xhly.manageapp.service.ManageAccessibilityService
54
 import com.xhly.manageapp.service.ManageAccessibilityService
55
 import com.xhly.manageapp.ui.ManageActivity
55
 import com.xhly.manageapp.ui.ManageActivity
56
 import com.xhly.manageapp.ui.login.activity.LoginActivity
56
 import com.xhly.manageapp.ui.login.activity.LoginActivity

+ 1
- 1
app/src/main/java/com/xhly/manageapp/utils/CustomAppUtils.kt View File

3
 import android.content.Context
3
 import android.content.Context
4
 import android.graphics.drawable.Drawable
4
 import android.graphics.drawable.Drawable
5
 import androidx.appcompat.content.res.AppCompatResources
5
 import androidx.appcompat.content.res.AppCompatResources
6
+import com.xhkjedu.manageapp.R
6
 import com.xhly.corelib.Const
7
 import com.xhly.corelib.Const
7
 import com.xhly.corelib.bean.AppInfo
8
 import com.xhly.corelib.bean.AppInfo
8
-import com.xhly.manageapp.R
9
 
9
 
10
 //用来创建一键加速,清除缓存,和自动旋转的appbean类
10
 //用来创建一键加速,清除缓存,和自动旋转的appbean类
11
 class CustomAppUtils {
11
 class CustomAppUtils {

BIN
app/src/main/res/mipmap-xhdpi/icon_launcher.png View File


+ 5
- 0
corelib/src/main/java/com/xhly/corelib/Const.kt View File

4
 object Const {
4
 object Const {
5
     const val isDebug = true
5
     const val isDebug = true
6
 
6
 
7
+    /**
8
+     * 当前应用包名
9
+     */
10
+    const val CURRENTAPPPKG="com.xhkjedu.manageapp"
11
+
7
     //用户id
12
     //用户id
8
     var USERID :Long?= 1L
13
     var USERID :Long?= 1L
9
 
14
 

+ 0
- 1
corelib/src/main/java/com/xhly/corelib/utils/StatusBarUtil.java View File

7
 import android.view.Window;
7
 import android.view.Window;
8
 import android.view.WindowManager;
8
 import android.view.WindowManager;
9
 
9
 
10
-import com.xhly.corelib.R;
11
 
10
 
12
 import java.lang.reflect.Field;
11
 import java.lang.reflect.Field;
13
 import java.lang.reflect.Method;
12
 import java.lang.reflect.Method;

Loading…
Cancel
Save