Apps can launch other apps' activities inside their task. This makes it impossible to switch back and forth between the two. This module sets the FLAG_ACTIVITY_NEW_TASK flag when starting a new activity, which 'fixes' that.
Originally requested by jacknicholson here.
A quick toggle is available in the settings. Just check "Disable module" and the changes will take effect immediately. No need to restart.
You can use the blacklist or the whitelist to filter activities. If the blacklist is selected, all activities except those excluded will launch in a new task. If you use the whitelist, only matching activities will launch in a new task instead. The preferred way to add entries is through the log.
The activity components are output to the logcat. You can filter it for "activityforcenewtask componentString:" to see them. A line is logged for every started activity (you probably don't want to keep the log constantly turned on.)
A log viewer is also present in the app. You can press a log entry to directly add it to the currently active list. I'd advise you to only enable the log when needed.
The blacklist/whitelist settings are now only reloaded when necessary. Shouldn't make a big difference unless you have huge lists.
4.4.3 fix: get the context using a different method (fixes logging on 4.4.3).
Added Portuguese (Br) translation by meatboy371.
Only use context for logging;
Try to get the context in an alternate manner if the first one fails;
Bug fix: current package wasn't being detected properly;
Only start activities in a new task when the caller does not expect a result (different, more general implementation.)
Reverted back to hooking ActivityRecord's constructor. Should solve the issue where some activities' launches weren't being detected.
Updated Slovak translation.
Ignore activities that are launched by their own apps;
Added filtering options back. You can choose between the whitelist and the blacklist, but the no filtering option has been removed;
Added help dialogs for the whitelist/blacklist/log;
Bug fix: duplicate log entries when returning to the app with the log viewer open.
Other minor changes: use icons for action bar items, reorder preferences.
Removed none/blacklist filtering options. The whitelist is always used now (renamed to "Enabled Components") which means that you must configure the module, as it won't do anything by default.
Reverted back to hooking Activity.startActivity(Intent, Bundle). Other methods used to start an Activity require the usage of FLAG_ACTIVITY_NEW_TASK, so it doesn't actually make sense to hook anything else. Also removed the alternate way to get a context as it shouldn't be needed anymore.
Check if FLAG_ACTIVITY_NEW_TASK is already set, and do nothing if that's the case (the activity won't be logged either.)
Updated Slovak translations (by ja-som.)
Fix some crashes at startup;
Add FLAG_ACTIVITY_NEW_TASK flag instead of overwriting it. This fixes issues with XHalo and some apps showing in recents when they shouldn't;
Different hook, the previous one didn't catch all new activities.
Removed unnecessary logging.
Added option to enable/disable the blacklist (and log.) The blacklist requires a few extra calls which are unnecessary if you don't use it, so I'd advise you don't enable it unless you need it.
Cleanup/better performance for the log viewer.
The mod will now only modify intents that should be modified. This should fix all breakage without needing the blacklist. \o/
Log viewer improvements: tapping on an item now removes it from the list after adding it to the blacklist, and a toast is shown to indicate if it's been added to the blacklist.
Use flat text file for storing the logs instead of SharedPreferences. This is much better for performance, especially if the log gets long.
The blacklist is now for activities.
You can enable/disable logging from within the app.
Added log viewer to the app. You can tap a log entry to directly add it to the blacklist.
Fixes for the two icons appearing in the launcher.
Disable text correction when adding a blacklist item.
egingell for helping out with *what* to blacklist.
Thank you for trying to help me with my problem. I was looking at your SettingsHelper class and I think I need to start thinking of the Xposed side and Android side as separate apps and code it as such. But I'm too tired and achy to test right now.
Google presented their brand new UI for tablets alongsidethe release of Android 3.0 Honeycomb back in early … more
01 Sep 2014
By Tomek Kondrat
XDA Developers was founded by developers, for developers. It is now a valuable resource for people who want to make the most of their mobile devices, from customizing the look and feel to adding new functionality. Are you a developer?