Merge "Hide extra information link when it is empty" into main

This commit is contained in:
Hakjun Choi
2024-10-04 13:20:06 +00:00
committed by Android (Google) Code Review

View File

@@ -195,19 +195,19 @@ public class SatelliteSetting extends RestrictedDashboardFragment {
final String[] link = new String[1]; final String[] link = new String[1];
link[0] = readSatelliteMoreInfoString(mSubId); link[0] = readSatelliteMoreInfoString(mSubId);
footerPreference.setLearnMoreAction(view -> { if (link[0] != null && !link[0].isEmpty()) {
if (!link[0].isEmpty()) { footerPreference.setLearnMoreAction(view -> {
Intent helpIntent = HelpUtils.getHelpIntent(mActivity, link[0], if (!link[0].isEmpty()) {
this.getClass().getName()); Intent helpIntent = HelpUtils.getHelpIntent(mActivity, link[0],
if (helpIntent != null) { this.getClass().getName());
mActivity.startActivityForResult(helpIntent, /*requestCode=*/ 0); if (helpIntent != null) {
mActivity.startActivityForResult(helpIntent, /*requestCode=*/ 0);
}
} }
} });
}); footerPreference.setLearnMoreText(
footerPreference.setLearnMoreText( getResources().getString(R.string.more_about_satellite_messaging));
getResources().getString(R.string.more_about_satellite_messaging)); }
// TODO : b/320467418 add rounded rectangle border line to footer preference.
} }
} }