Merge "Settings: Fix FC when learn more textview help intent is NULL" am: 17e8159641 am: 6040d46cb0

Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/1961121

Change-Id: I9f8bb883a0fa1d902144fbf1f4aba9f03f623728
This commit is contained in:
Treehugger Robot
2022-02-08 09:52:04 +00:00
committed by Automerger Merge Worker

View File

@@ -354,12 +354,15 @@ public class AdvancedPowerUsageDetail extends DashboardFragment implements
footerString = context.getString(R.string.manager_battery_usage_footer);
}
mFooterPreference.setTitle(footerString);
mFooterPreference.setLearnMoreAction(v ->
startActivityForResult(HelpUtils.getHelpIntent(context,
context.getString(R.string.help_url_app_usage_settings),
/*backupContext=*/ ""), /*requestCode=*/ 0));
mFooterPreference.setLearnMoreContentDescription(
context.getString(R.string.manager_battery_usage_link_a11y));
final Intent helpIntent = HelpUtils.getHelpIntent(context,
context.getString(R.string.help_url_app_usage_settings),
/*backupContext=*/ "");
if (helpIntent != null) {
mFooterPreference.setLearnMoreAction(v ->
startActivityForResult(helpIntent, /*requestCode=*/ 0));
mFooterPreference.setLearnMoreContentDescription(
context.getString(R.string.manager_battery_usage_link_a11y));
}
}
@Override