From a0ba9182ada1a43816c93afef2d9b7ac1dfd3695 Mon Sep 17 00:00:00 2001 From: Hakjun Choi Date: Mon, 29 Jul 2024 16:46:38 +0000 Subject: [PATCH] [Internal cleanup] remove warning message for resource ID Currently we are seeing Drawable com.android.settings:drawable/ic_check_circle_24px has unresolved theme attributes! error To address this, use Context.getDrawable(int) to provide theme info when using the icon Bug: 356149221 Flag: EXEMPT bugfix Test: manually run Satellite setting menu and check the log whether the waring is shown or not Change-Id: I55fd1bd4cbaf07e7433cdd286e71f88dacc3e1b5 --- .../android/settings/network/telephony/SatelliteSetting.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/com/android/settings/network/telephony/SatelliteSetting.java b/src/com/android/settings/network/telephony/SatelliteSetting.java index 7e9e61d07ed..df580482ed0 100644 --- a/src/com/android/settings/network/telephony/SatelliteSetting.java +++ b/src/com/android/settings/network/telephony/SatelliteSetting.java @@ -150,7 +150,7 @@ public class SatelliteSetting extends RestrictedDashboardFragment { /* In case satellite is allowed by carrier's entitlement server, the page will show the check icon with guidance that satellite is included in user's mobile plan */ preference.setTitle(R.string.title_have_satellite_plan); - icon = getResources().getDrawable(R.drawable.ic_check_circle_24px); + icon = getContext().getDrawable(R.drawable.ic_check_circle_24px); } else { /* Or, it will show the blocked icon with the guidance that satellite is not included in user's mobile plan */