Browse Source

1.Intent添加addFlags防止应用跳出管控

20241218TB223FC(测试jar包)
wangwanlei 8 months ago
parent
commit
8164dd6475
1 changed files with 1 additions and 0 deletions
  1. 1
    0
      corelib/src/main/java/com/xhly/corelib/utils/AppUtils.java

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

@@ -52,6 +52,7 @@ public class AppUtils {
52 52
             Intent launchIntent = new Intent();
53 53
             launchIntent.setComponent(new ComponentName(packName,
54 54
                     info.activityInfo.name));
55
+            launchIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
55 56
             mInfo.setIntent(launchIntent);
56 57
             list.add(mInfo);
57 58
         }

Loading…
Cancel
Save