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

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

Change-Id: If94e29e72c3ce461e27d028148d2c0e4bdbba9e9
This commit is contained in:
Treehugger Robot
2022-02-08 09:36:17 +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