| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
…nds has two recent task problem
|
Good job. 顺便问下,这个可以通过 Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS 解决么? |
Sorry, something went wrong.
|
比如说,在 ActivityStack里这么做: private Intent startActivityProcess(int userId, ActivityRecord sourceRecord, Intent intent, ActivityInfo info) {
intent = new Intent(intent);
ProcessRecord targetApp = mService.startProcessIfNeedLocked(info.processName, userId, info.packageName);
if (targetApp == null) {
return null;
}
Intent targetIntent = new Intent();
targetIntent.setClassName(VirtualCore.get().getHostPkg(), fetchStubActivity(targetApp.vpid, info));
ComponentName component = intent.getComponent();
if (component == null) {
component = ComponentUtils.toComponentName(info);
}
targetIntent.setType(component.flattenToString());
StubActivityRecord saveInstance = new StubActivityRecord(intent, info,
sourceRecord != null ? sourceRecord.component : null, userId);
saveInstance.saveToIntent(targetIntent);
if (((info.flags & ActivityInfo.FLAG_EXCLUDE_FROM_RECENTS) != 0)) {
intent.addFlags(Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS);
}
return targetIntent;
} |
Sorry, something went wrong.
|
之前就尝试过intent设置flag这种方法,并不可行,初次跳转到Mobile Legends的时候,最近任务只有一个任务,回到桌面再看任务栏,一个任务都没有了。 |
Sorry, something went wrong.
Deal with activity property ExcludeFromRecents, to avoid Mobile Legnends has two recent task problem
| Back | FazBrowse Home | New Git URL |
Deal with activity property excludeFromRecents.
The app Mobile Legnends has two tasks in the recent task list, when launching from VituralXposed.