Merge "Fix crash in clicking Default Home gear icon." am: 0c724f5181
am: 51a72d4c38
Change-Id: I7ff6b0e405c3d87faa869bd53eee9983648ccf69
This commit is contained in:
@@ -106,7 +106,9 @@ public class DefaultHomePreferenceController extends DefaultAppPreferenceControl
|
||||
Intent intent = new Intent(Intent.ACTION_APPLICATION_PREFERENCES)
|
||||
.setPackage(packageName)
|
||||
.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);
|
||||
return mPackageManager.queryIntentActivities(intent, 0).size() == 1 ? intent : null;
|
||||
return intent.resolveActivity(mPackageManager.getPackageManager()) != null
|
||||
? intent
|
||||
: null;
|
||||
}
|
||||
|
||||
public static boolean hasHomePreference(String pkg, Context context) {
|
||||
|
Reference in New Issue
Block a user