Fix system warning

This commit is contained in:
vvb2060 2022-12-04 23:18:36 +08:00 committed by 南宫雪珊
parent 377c8af3c7
commit ff35b9dc11
1 changed files with 1 additions and 0 deletions

View File

@ -153,6 +153,7 @@ public class ActivityManagerService {
ProfilerInfo profilerInfo, Bundle options, int userId) throws RemoteException { ProfilerInfo profilerInfo, Bundle options, int userId) throws RemoteException {
IActivityManager am = getActivityManager(); IActivityManager am = getActivityManager();
if (am == null || thread == null) return -1; if (am == null || thread == null) return -1;
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
return am.startActivityAsUserWithFeature(thread, callingPackage, callingFeatureId, intent, resolvedType, resultTo, resultWho, requestCode, flags, profilerInfo, options, userId); return am.startActivityAsUserWithFeature(thread, callingPackage, callingFeatureId, intent, resolvedType, resultTo, resultWho, requestCode, flags, profilerInfo, options, userId);
} else { } else {