Commit 26e5845f authored by Lijin Shen's avatar Lijin Shen Committed by Commit Bot

Fix crash when default app settings is not available

When "system settings" method is used under P-, the app crashes because
the system does not have "change default" settings. This CL skips
when the system does not have such settings.

Bug: 1122907
Change-Id: I6133e83ee15074cd48bd4db6c098005428cb088b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2382895
Commit-Queue: Lijin Shen <lazzzis@google.com>
Reviewed-by: default avatarPavel Yatsuk <pavely@chromium.org>
Cr-Commit-Position: refs/heads/master@{#802921}
parent 83651b03
......@@ -154,6 +154,9 @@ public class DefaultBrowserPromoUtils {
ChromeFeatureList.ANDROID_DEFAULT_BROWSER_PROMO, P_NO_DEFAULT_PROMO_STRATEGY);
if (TextUtils.equals(promoOnP, "disabled")) {
return false;
} else if (TextUtils.equals(promoOnP, "system_settings")
&& !doesManageDefaultAppsSettingsActivityExist()) {
return false;
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment