Rename app_details to entity_header

Bug: 37669238
Test: rerun robotests
Change-Id: Iab2cdf83d8b35ce3d45b0c413cad8614d44d5ed3
This commit is contained in:
Fan Zhang
2017-05-17 14:15:34 -07:00
parent 867c68e76c
commit 2ed0f99989
8 changed files with 17 additions and 17 deletions

View File

@@ -19,7 +19,7 @@
<com.android.settings.applications.LayoutPreference <com.android.settings.applications.LayoutPreference
android:key="header_view" android:key="header_view"
android:layout="@layout/app_details" android:layout="@layout/settings_entity_header"
android:selectable="false" android:selectable="false"
android:order="-10000"/> android:order="-10000"/>

View File

@@ -19,7 +19,7 @@
<com.android.settings.applications.LayoutPreference <com.android.settings.applications.LayoutPreference
android:key="header_view" android:key="header_view"
android:layout="@layout/app_details" android:layout="@layout/settings_entity_header"
android:selectable="false" android:selectable="false"
android:order="-10000"/> android:order="-10000"/>

View File

@@ -48,10 +48,10 @@ public class AccountDetailDashboardFragment extends DashboardFragment {
public static final String KEY_ACCOUNT_HEADER = "account_header"; public static final String KEY_ACCOUNT_HEADER = "account_header";
public static final String KEY_USER_HANDLE = "user_handle"; public static final String KEY_USER_HANDLE = "user_handle";
@VisibleForTesting(otherwise = VisibleForTesting.PRIVATE) @VisibleForTesting
Account mAccount; Account mAccount;
private String mAccountLabel; private String mAccountLabel;
@VisibleForTesting(otherwise = VisibleForTesting.PRIVATE) @VisibleForTesting
String mAccountType; String mAccountType;
private AccountSyncPreferenceController mAccountSynController; private AccountSyncPreferenceController mAccountSynController;
private RemoveAccountPreferenceController mRemoveAccountController; private RemoveAccountPreferenceController mRemoveAccountController;

View File

@@ -93,7 +93,7 @@ public class AppHeaderController {
mAppHeader = appHeader; mAppHeader = appHeader;
} else { } else {
mAppHeader = LayoutInflater.from(fragment.getContext()) mAppHeader = LayoutInflater.from(fragment.getContext())
.inflate(R.layout.app_details, null /* root */); .inflate(R.layout.settings_entity_header, null /* root */);
} }
} }

View File

@@ -349,7 +349,7 @@ public class InstalledAppDetails extends AppInfoBase
} }
setHasOptionsMenu(true); setHasOptionsMenu(true);
addPreferencesFromResource(R.xml.installed_app_details_ia); addPreferencesFromResource(R.xml.installed_app_details);
addDynamicPrefs(); addDynamicPrefs();
if (Utils.isBandwidthControlEnabled()) { if (Utils.isBandwidthControlEnabled()) {
INetworkStatsService statsService = INetworkStatsService.Stub.asInterface( INetworkStatsService statsService = INetworkStatsService.Stub.asInterface(

View File

@@ -224,7 +224,7 @@ public class AdvancedPowerUsageDetail extends DashboardFragment implements
@Override @Override
protected int getPreferenceScreenResId() { protected int getPreferenceScreenResId() {
return R.xml.power_usage_detail_ia; return R.xml.power_usage_detail;
} }
@Override @Override

View File

@@ -98,7 +98,7 @@ public class AppHeaderControllerTest {
@Test @Test
public void testBuildView_constructedWithView_shouldReturnSameView() { 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); mController = new AppHeaderController(mShadowContext, mFragment, inputView);
View view = mController.done(mActivity); View view = mController.done(mActivity);
@@ -108,7 +108,7 @@ public class AppHeaderControllerTest {
@Test @Test
public void bindViews_shouldBindAllData() { public void bindViews_shouldBindAllData() {
final String testString = "test"; 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 label = appHeader.findViewById(R.id.app_detail_title);
final TextView version = appHeader.findViewById(R.id.app_detail_summary); final TextView version = appHeader.findViewById(R.id.app_detail_summary);
@@ -129,7 +129,7 @@ public class AppHeaderControllerTest {
info.activityInfo.packageName = "123"; info.activityInfo.packageName = "123";
info.activityInfo.name = "321"; info.activityInfo.name = "321";
final View appLinks = mLayoutInflater 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())) when(mContext.getPackageManager().resolveActivity(any(Intent.class), anyInt()))
.thenReturn(info); .thenReturn(info);
@@ -154,7 +154,7 @@ public class AppHeaderControllerTest {
@Test @Test
public void bindButton_noAppPref_shouldNotShowButton() { public void bindButton_noAppPref_shouldNotShowButton() {
final View appLinks = mLayoutInflater 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())) when(mContext.getPackageManager().resolveActivity(any(Intent.class), anyInt()))
.thenReturn(null); .thenReturn(null);
@@ -173,7 +173,7 @@ public class AppHeaderControllerTest {
@Test @Test
public void bindButton_noAppInfo_shouldNotShowButton() { public void bindButton_noAppInfo_shouldNotShowButton() {
final View appLinks = mLayoutInflater 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 = new AppHeaderController(mContext, mFragment, appLinks);
mController.setPackageName(null) mController.setPackageName(null)
@@ -191,7 +191,7 @@ public class AppHeaderControllerTest {
@Test @Test
public void bindButton_hasAppInfo_shouldShowButton() { public void bindButton_hasAppInfo_shouldShowButton() {
final View appLinks = mLayoutInflater 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(mFragment.getActivity()).thenReturn(mock(Activity.class));
mController = new AppHeaderController(mContext, mFragment, appLinks); mController = new AppHeaderController(mContext, mFragment, appLinks);
@@ -211,7 +211,7 @@ public class AppHeaderControllerTest {
@Test @Test
public void bindButton_hasAppInfo_shouldHaveContentDescription() { public void bindButton_hasAppInfo_shouldHaveContentDescription() {
final View appLinks = mLayoutInflater 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(mFragment.getActivity()).thenReturn(mock(Activity.class));
when(mContext.getString(eq(R.string.application_info_label))).thenReturn("App Info"); when(mContext.getString(eq(R.string.application_info_label))).thenReturn("App Info");
@@ -230,7 +230,7 @@ public class AppHeaderControllerTest {
@Test @Test
public void bindButton_hasAppNotifIntent_shouldShowButton() { public void bindButton_hasAppNotifIntent_shouldShowButton() {
final View appLinks = mLayoutInflater 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 = new AppHeaderController(mContext, mFragment, appLinks);
mController.setAppNotifPrefIntent(new Intent()) mController.setAppNotifPrefIntent(new Intent())
@@ -249,7 +249,7 @@ public class AppHeaderControllerTest {
// app is instant. // app is instant.
@Test @Test
public void instantApps_normalAppsDontGetLabel() { 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 = new AppHeaderController(mContext, mFragment, appHeader);
mController.done(mActivity); mController.done(mActivity);
assertThat(appHeader.findViewById(R.id.install_type).getVisibility()) 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 that the "instant apps" label is present in the header when we have an instant app.
@Test @Test
public void instantApps_expectedHeaderItem() { 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 = new AppHeaderController(mContext, mFragment, appHeader);
mController.setIsInstantApp(true); mController.setIsInstantApp(true);
mController.done(mActivity); mController.done(mActivity);