Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b85bf673 authored by ykhung's avatar ykhung Committed by Automerger Merge Worker
Browse files

Fix NPE issue of usage detailed page learn more button click event am: 8f0291cd

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

Change-Id: I06e12f5250b7abe8ce5546cf3c91952f6704fe6e
parents 00bc734b 8f0291cd
Loading
Loading
Loading
Loading
+8 −6
Original line number Diff line number Diff line
@@ -383,13 +383,15 @@ public class AdvancedPowerUsageDetail extends DashboardFragment implements
            footerString = context.getString(R.string.manager_battery_usage_footer);
        }
        mFooterPreference.setTitle(footerString);
        final Intent helpIntent = HelpUtils.getHelpIntent(context, context.getString(
                R.string.help_url_app_usage_settings), /*backupContext=*/ "");
        if (helpIntent != null) {
            mFooterPreference.setLearnMoreAction(v ->
                startActivityForResult(HelpUtils.getHelpIntent(context,
                        context.getString(R.string.help_url_app_usage_settings),
                        /*backupContext=*/ ""), /*requestCode=*/ 0));
                    startActivityForResult(helpIntent, /*requestCode=*/ 0));
            mFooterPreference.setLearnMoreContentDescription(
                    context.getString(R.string.manager_battery_usage_link_a11y));
        }
    }

    @Override
    public int getMetricsCategory() {