You can set android: launchMode = "singleInstance". In your code example, this would be:
<PreferenceScreen android:title="@string/preferences_activity_syncaccounts_title" android:summary="@string/preferences_activity_syncaccounts_summary" android:dialogTitle="@string/preferences_activity_syncaccounts_title"> <intent android:action="android.settings.SYNC_SETTINGS" android:launchMode="singleInstance" /> </PreferenceScreen>
On the other hand, the activity of "singleInstance" does not allow any other actions not to participate in its task. This is the only lesson in the task. If it starts another action, this action is assigned to another task - as if FLAG_ACTIVITY_NEW_TASK was in the intent.
You can read more here: http://developer.android.com/guide/topics/manifest/activity-element.html#lmode
source share