From 572afa59e6a1628c8ac42e76604b9b0bb2807ef0 Mon Sep 17 00:00:00 2001 From: Yiling Chuang Date: Fri, 6 Dec 2024 11:03:51 +0000 Subject: [PATCH] Fix the unclickable learn more link. The UsageProgressBarPreference is replaced with BatteryHeaderTextPreference, and the movement method of the textview was not added, which leads to the unclickable link. Hence, add back the movement method of the textview to allow the linkable text. Fixes: 382395040 Test: manual test Flag: EXEMPT bugfix Change-Id: I6dd5b2c2fbec891035fa8b0fefa47de6962324b7 --- .../android/settings/fuelgauge/BatteryHeaderTextPreference.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/com/android/settings/fuelgauge/BatteryHeaderTextPreference.java b/src/com/android/settings/fuelgauge/BatteryHeaderTextPreference.java index 516cc711657..a809a5682c8 100644 --- a/src/com/android/settings/fuelgauge/BatteryHeaderTextPreference.java +++ b/src/com/android/settings/fuelgauge/BatteryHeaderTextPreference.java @@ -18,6 +18,7 @@ package com.android.settings.fuelgauge; import android.content.Context; import android.text.TextUtils; +import android.text.method.LinkMovementMethod; import android.util.AttributeSet; import android.widget.TextView; @@ -44,6 +45,7 @@ public class BatteryHeaderTextPreference extends Preference implements GroupSect public void onBindViewHolder(PreferenceViewHolder view) { final TextView textView = (TextView) view.findViewById(R.id.text); textView.setText(mText); + textView.setMovementMethod(LinkMovementMethod.getInstance()); if (!TextUtils.isEmpty(mContentDescription)) { textView.setContentDescription(mContentDescription); }