Move DWB to the fifth position from the bottom on the homepage
Remove relevant configs, logics and tests.
Bug: 187885890
Test: robotests & visual
Change-Id: I309d5290f19bf0b01692dd6f14c4cdcc52066453
diff --git a/res/values/config.xml b/res/values/config.xml
index d37db44..21d9c75 100755
--- a/res/values/config.xml
+++ b/res/values/config.xml
@@ -495,12 +495,6 @@
<!-- Authority of advanced device battery prediction -->
<string name="config_battery_prediction_authority" translatable="false"></string>
- <!-- Packages for overriding tile positions on the homepage -->
- <string-array name="config_homepage_tile_packages" translatable="false"/>
-
- <!-- Orders for overriding tile positions on the homepage -->
- <integer-array name="config_homepage_tile_orders"/>
-
<!-- Whether to handle slot change events -->
<bool name="config_handle_sim_slot_change">false</bool>
diff --git a/src/com/android/settings/dashboard/DashboardFeatureProviderImpl.java b/src/com/android/settings/dashboard/DashboardFeatureProviderImpl.java
index b404ecc..5a686c2 100644
--- a/src/com/android/settings/dashboard/DashboardFeatureProviderImpl.java
+++ b/src/com/android/settings/dashboard/DashboardFeatureProviderImpl.java
@@ -185,9 +185,6 @@
pref.setOrder(order + baseOrder);
}
}
-
- overrideTilePosition(tile, pref);
-
return outObservers.isEmpty() ? null : outObservers;
}
@@ -457,25 +454,4 @@
}
return eligibleUsers;
}
-
- private void overrideTilePosition(Tile tile, Preference pref) {
- if (FeatureFlagUtils.isEnabled(mContext, FeatureFlags.SILKY_HOME)
- && TextUtils.equals(tile.getCategory(), CategoryKey.CATEGORY_HOMEPAGE)) {
- final String[] homepageTilePackages = mContext.getResources().getStringArray(
- R.array.config_homepage_tile_packages);
- final int[] homepageTileOrders = mContext.getResources().getIntArray(
- R.array.config_homepage_tile_orders);
- if (homepageTilePackages.length == 0
- || homepageTilePackages.length != homepageTileOrders.length) {
- return;
- }
-
- for (int i = 0; i < homepageTilePackages.length; i++) {
- if (TextUtils.equals(tile.getPackageName(), homepageTilePackages[i])) {
- pref.setOrder(homepageTileOrders[i]);
- return;
- }
- }
- }
- }
}
diff --git a/tests/robotests/res/values-mcc999/config.xml b/tests/robotests/res/values-mcc999/config.xml
index af02d45..b1d4be9 100644
--- a/tests/robotests/res/values-mcc999/config.xml
+++ b/tests/robotests/res/values-mcc999/config.xml
@@ -100,14 +100,4 @@
<!-- Uri to query non-public Slice Uris. -->
<string name="config_non_public_slice_query_uri" translatable="false">content://com.android.settings.slices/test</string>
-
- <!-- Packages for overriding tile positions on the homepage -->
- <string-array name="config_homepage_tile_packages" translatable="false">
- <item>com.android.settings</item>
- </string-array>
-
- <!-- Orders for overriding tile positions on the homepage -->
- <integer-array name="config_homepage_tile_orders">
- <item>100</item>
- </integer-array>
</resources>
diff --git a/tests/robotests/src/com/android/settings/dashboard/DashboardFeatureProviderImplTest.java b/tests/robotests/src/com/android/settings/dashboard/DashboardFeatureProviderImplTest.java
index 1fba12b..b2d11dc 100644
--- a/tests/robotests/src/com/android/settings/dashboard/DashboardFeatureProviderImplTest.java
+++ b/tests/robotests/src/com/android/settings/dashboard/DashboardFeatureProviderImplTest.java
@@ -672,18 +672,4 @@
assertThat(argument.getValue().getIdentifier()).isEqualTo(0);
verify(mActivity, never()).getSupportFragmentManager();
}
-
- @Test
- @Config(qualifiers = "mcc999")
- public void bindPreference_specificHomepageTile_shouldOverridePosition() {
- FeatureFlagUtils.setEnabled(mContext, FeatureFlags.SILKY_HOME, true);
- final Preference preference = new Preference(RuntimeEnvironment.application);
- final Tile tile = new ActivityTile(mActivityInfo, CategoryKey.CATEGORY_HOMEPAGE);
-
- mImpl.bindPreferenceToTileAndGetObservers(mActivity, mForceRoundedIcon,
- MetricsEvent.VIEW_UNKNOWN, preference, tile, null /*key */,
- Preference.DEFAULT_ORDER);
-
- assertThat(preference.getOrder()).isEqualTo(100);
- }
}