diff --git a/res/xml/development_prefs.xml b/res/xml/development_prefs.xml index 804ede93b5a..bdbd86ff5fa 100644 --- a/res/xml/development_prefs.xml +++ b/res/xml/development_prefs.xml @@ -380,4 +380,8 @@ android:title="@string/reset_shortcut_manager_throttling" /> + + diff --git a/src/com/android/settings/dashboard/DashboardFeatureProvider.java b/src/com/android/settings/dashboard/DashboardFeatureProvider.java index dee9f368dd6..2a5e800b403 100644 --- a/src/com/android/settings/dashboard/DashboardFeatureProvider.java +++ b/src/com/android/settings/dashboard/DashboardFeatureProvider.java @@ -88,5 +88,9 @@ public interface DashboardFeatureProvider { ProgressiveDisclosureMixin getProgressiveDisclosureMixin(Context context, DashboardFragment fragment); + /** + * Returns additional intent filter action for dashboard tiles + */ + String getExtraIntentAction(); } diff --git a/src/com/android/settings/dashboard/DashboardFeatureProviderImpl.java b/src/com/android/settings/dashboard/DashboardFeatureProviderImpl.java index 22454870cb7..e7d2b5876d7 100644 --- a/src/com/android/settings/dashboard/DashboardFeatureProviderImpl.java +++ b/src/com/android/settings/dashboard/DashboardFeatureProviderImpl.java @@ -51,7 +51,8 @@ public class DashboardFeatureProviderImpl implements DashboardFeatureProvider { private final CategoryManager mCategoryManager; public DashboardFeatureProviderImpl(Context context) { - this(context.getApplicationContext(), CategoryManager.get(context)); + mContext = context; + mCategoryManager = CategoryManager.get(context, getExtraIntentAction()); } @VisibleForTesting @@ -182,4 +183,9 @@ public class DashboardFeatureProviderImpl implements DashboardFeatureProvider { DashboardFragment fragment) { return new ProgressiveDisclosureMixin(context, this, fragment); } + + @Override + public String getExtraIntentAction() { + return null; + } } diff --git a/tests/robotests/src/com/android/settings/dashboard/DashboardFeatureProviderImplTest.java b/tests/robotests/src/com/android/settings/dashboard/DashboardFeatureProviderImplTest.java index 6aa22b2c6f2..3ffd059d75c 100644 --- a/tests/robotests/src/com/android/settings/dashboard/DashboardFeatureProviderImplTest.java +++ b/tests/robotests/src/com/android/settings/dashboard/DashboardFeatureProviderImplTest.java @@ -242,4 +242,9 @@ public class DashboardFeatureProviderImplTest { CategoryKey.CATEGORY_HOMEPAGE).isEmpty()) .isFalse(); } + + @Test + public void testGetExtraIntentAction_shouldReturnNull() { + assertThat(mImpl.getExtraIntentAction()).isNull(); + } }