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

Test: Manually tested on device
Bug: 69960568
Change-Id: If9de28936a7156c4d9c68c85c168ff4aa7492151
This commit is contained in:
Sunny Goyal
2017-12-08 09:35:03 -08:00
parent b8eb89579c
commit ea63e4c6c6

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;
}