Fix references to resources for Settings

Bug: 293810334
Test: m Settings
Change-Id: Ie140278f492ef7e1c062ec1ecae2866c521a86aa
This commit is contained in:
Chaohui Wang
2023-07-31 15:56:42 +08:00
parent ed505c25fa
commit 2541381259
247 changed files with 859 additions and 721 deletions

View File

@@ -80,7 +80,7 @@ public class RecentLocationAccessPreferenceControllerTest {
mController.init(mDashboardFragment);
final String key = mController.getPreferenceKey();
mAppEntitiesHeaderView = LayoutInflater.from(mContext).inflate(
R.layout.app_entities_header, null /* root */);
com.android.settingslib.widget.R.layout.app_entities_header, null /* root */);
when(mScreen.findPreference(key)).thenReturn(mLayoutPreference);
when(mLayoutPreference.getKey()).thenReturn(key);
when(mLayoutPreference.getContext()).thenReturn(mContext);
@@ -108,7 +108,8 @@ public class RecentLocationAccessPreferenceControllerTest {
final TextView title = mAppEntitiesHeaderView.findViewById(R.id.header_title);
assertThat(title.getText()).isEqualTo(
mContext.getText(R.string.location_category_recent_location_access));
final TextView details = mAppEntitiesHeaderView.findViewById(R.id.header_details);
final TextView details = mAppEntitiesHeaderView
.findViewById(com.android.settingslib.widget.R.id.header_details);
assertThat(details.getText()).isEqualTo(
mContext.getText(R.string.location_recent_location_access_view_details));
assertThat(details.hasOnClickListeners()).isTrue();