Merge "Clearing task when opening home settings in case it is already in the same task"

This commit is contained in:
Sunny Goyal
2017-12-11 17:36:31 +00:00
committed by Android (Google) Code Review

View File

@@ -100,7 +100,7 @@ public class DefaultHomePreferenceController extends DefaultAppPreferenceControl
Intent intent = new Intent(Intent.ACTION_APPLICATION_PREFERENCES)
.setPackage(packageName)
.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);
return mPackageManager.queryIntentActivities(intent, 0).size() == 1 ? intent : null;
}