Rename app_details to entity_header
Bug: 37669238 Test: rerun robotests Change-Id: Iab2cdf83d8b35ce3d45b0c413cad8614d44d5ed3
This commit is contained in:
@@ -19,7 +19,7 @@
|
||||
|
||||
<com.android.settings.applications.LayoutPreference
|
||||
android:key="header_view"
|
||||
android:layout="@layout/app_details"
|
||||
android:layout="@layout/settings_entity_header"
|
||||
android:selectable="false"
|
||||
android:order="-10000"/>
|
||||
|
@@ -19,7 +19,7 @@
|
||||
|
||||
<com.android.settings.applications.LayoutPreference
|
||||
android:key="header_view"
|
||||
android:layout="@layout/app_details"
|
||||
android:layout="@layout/settings_entity_header"
|
||||
android:selectable="false"
|
||||
android:order="-10000"/>
|
||||
|
@@ -48,10 +48,10 @@ public class AccountDetailDashboardFragment extends DashboardFragment {
|
||||
public static final String KEY_ACCOUNT_HEADER = "account_header";
|
||||
public static final String KEY_USER_HANDLE = "user_handle";
|
||||
|
||||
@VisibleForTesting(otherwise = VisibleForTesting.PRIVATE)
|
||||
@VisibleForTesting
|
||||
Account mAccount;
|
||||
private String mAccountLabel;
|
||||
@VisibleForTesting(otherwise = VisibleForTesting.PRIVATE)
|
||||
@VisibleForTesting
|
||||
String mAccountType;
|
||||
private AccountSyncPreferenceController mAccountSynController;
|
||||
private RemoveAccountPreferenceController mRemoveAccountController;
|
||||
|
@@ -93,7 +93,7 @@ public class AppHeaderController {
|
||||
mAppHeader = appHeader;
|
||||
} else {
|
||||
mAppHeader = LayoutInflater.from(fragment.getContext())
|
||||
.inflate(R.layout.app_details, null /* root */);
|
||||
.inflate(R.layout.settings_entity_header, null /* root */);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -349,7 +349,7 @@ public class InstalledAppDetails extends AppInfoBase
|
||||
}
|
||||
|
||||
setHasOptionsMenu(true);
|
||||
addPreferencesFromResource(R.xml.installed_app_details_ia);
|
||||
addPreferencesFromResource(R.xml.installed_app_details);
|
||||
addDynamicPrefs();
|
||||
if (Utils.isBandwidthControlEnabled()) {
|
||||
INetworkStatsService statsService = INetworkStatsService.Stub.asInterface(
|
||||
|
@@ -224,7 +224,7 @@ public class AdvancedPowerUsageDetail extends DashboardFragment implements
|
||||
|
||||
@Override
|
||||
protected int getPreferenceScreenResId() {
|
||||
return R.xml.power_usage_detail_ia;
|
||||
return R.xml.power_usage_detail;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@@ -98,7 +98,7 @@ public class AppHeaderControllerTest {
|
||||
|
||||
@Test
|
||||
public void testBuildView_constructedWithView_shouldReturnSameView() {
|
||||
View inputView = mLayoutInflater.inflate(R.layout.app_details, null /* root */);
|
||||
View inputView = mLayoutInflater.inflate(R.layout.settings_entity_header, null /* root */);
|
||||
mController = new AppHeaderController(mShadowContext, mFragment, inputView);
|
||||
View view = mController.done(mActivity);
|
||||
|
||||
@@ -108,7 +108,7 @@ public class AppHeaderControllerTest {
|
||||
@Test
|
||||
public void bindViews_shouldBindAllData() {
|
||||
final String testString = "test";
|
||||
final View appHeader = mLayoutInflater.inflate(R.layout.app_details, null /* root */);
|
||||
final View appHeader = mLayoutInflater.inflate(R.layout.settings_entity_header, null /* root */);
|
||||
final TextView label = appHeader.findViewById(R.id.app_detail_title);
|
||||
final TextView version = appHeader.findViewById(R.id.app_detail_summary);
|
||||
|
||||
@@ -129,7 +129,7 @@ public class AppHeaderControllerTest {
|
||||
info.activityInfo.packageName = "123";
|
||||
info.activityInfo.name = "321";
|
||||
final View appLinks = mLayoutInflater
|
||||
.inflate(R.layout.app_details, null /* root */);
|
||||
.inflate(R.layout.settings_entity_header, null /* root */);
|
||||
when(mContext.getPackageManager().resolveActivity(any(Intent.class), anyInt()))
|
||||
.thenReturn(info);
|
||||
|
||||
@@ -154,7 +154,7 @@ public class AppHeaderControllerTest {
|
||||
@Test
|
||||
public void bindButton_noAppPref_shouldNotShowButton() {
|
||||
final View appLinks = mLayoutInflater
|
||||
.inflate(R.layout.app_details, null /* root */);
|
||||
.inflate(R.layout.settings_entity_header, null /* root */);
|
||||
when(mContext.getPackageManager().resolveActivity(any(Intent.class), anyInt()))
|
||||
.thenReturn(null);
|
||||
|
||||
@@ -173,7 +173,7 @@ public class AppHeaderControllerTest {
|
||||
@Test
|
||||
public void bindButton_noAppInfo_shouldNotShowButton() {
|
||||
final View appLinks = mLayoutInflater
|
||||
.inflate(R.layout.app_details, null /* root */);
|
||||
.inflate(R.layout.settings_entity_header, null /* root */);
|
||||
|
||||
mController = new AppHeaderController(mContext, mFragment, appLinks);
|
||||
mController.setPackageName(null)
|
||||
@@ -191,7 +191,7 @@ public class AppHeaderControllerTest {
|
||||
@Test
|
||||
public void bindButton_hasAppInfo_shouldShowButton() {
|
||||
final View appLinks = mLayoutInflater
|
||||
.inflate(R.layout.app_details, null /* root */);
|
||||
.inflate(R.layout.settings_entity_header, null /* root */);
|
||||
when(mFragment.getActivity()).thenReturn(mock(Activity.class));
|
||||
|
||||
mController = new AppHeaderController(mContext, mFragment, appLinks);
|
||||
@@ -211,7 +211,7 @@ public class AppHeaderControllerTest {
|
||||
@Test
|
||||
public void bindButton_hasAppInfo_shouldHaveContentDescription() {
|
||||
final View appLinks = mLayoutInflater
|
||||
.inflate(R.layout.app_details, null /* root */);
|
||||
.inflate(R.layout.settings_entity_header, null /* root */);
|
||||
when(mFragment.getActivity()).thenReturn(mock(Activity.class));
|
||||
when(mContext.getString(eq(R.string.application_info_label))).thenReturn("App Info");
|
||||
|
||||
@@ -230,7 +230,7 @@ public class AppHeaderControllerTest {
|
||||
@Test
|
||||
public void bindButton_hasAppNotifIntent_shouldShowButton() {
|
||||
final View appLinks = mLayoutInflater
|
||||
.inflate(R.layout.app_details, null /* root */);
|
||||
.inflate(R.layout.settings_entity_header, null /* root */);
|
||||
|
||||
mController = new AppHeaderController(mContext, mFragment, appLinks);
|
||||
mController.setAppNotifPrefIntent(new Intent())
|
||||
@@ -249,7 +249,7 @@ public class AppHeaderControllerTest {
|
||||
// app is instant.
|
||||
@Test
|
||||
public void instantApps_normalAppsDontGetLabel() {
|
||||
final View appHeader = mLayoutInflater.inflate(R.layout.app_details, null /* root */);
|
||||
final View appHeader = mLayoutInflater.inflate(R.layout.settings_entity_header, null /* root */);
|
||||
mController = new AppHeaderController(mContext, mFragment, appHeader);
|
||||
mController.done(mActivity);
|
||||
assertThat(appHeader.findViewById(R.id.install_type).getVisibility())
|
||||
@@ -259,7 +259,7 @@ public class AppHeaderControllerTest {
|
||||
// Test that the "instant apps" label is present in the header when we have an instant app.
|
||||
@Test
|
||||
public void instantApps_expectedHeaderItem() {
|
||||
final View appHeader = mLayoutInflater.inflate(R.layout.app_details, null /* root */);
|
||||
final View appHeader = mLayoutInflater.inflate(R.layout.settings_entity_header, null /* root */);
|
||||
mController = new AppHeaderController(mContext, mFragment, appHeader);
|
||||
mController.setIsInstantApp(true);
|
||||
mController.done(mActivity);
|
||||
|
Reference in New Issue
Block a user