Loading res/xml/development_prefs.xml +4 −0 Original line number Diff line number Diff line Loading @@ -380,4 +380,8 @@ android:title="@string/reset_shortcut_manager_throttling" /> </PreferenceCategory> <PreferenceCategory android:key="dashboard_tile_placeholder" android:order="200"/> </PreferenceScreen> src/com/android/settings/dashboard/DashboardFeatureProvider.java +4 −0 Original line number Diff line number Diff line Loading @@ -88,5 +88,9 @@ public interface DashboardFeatureProvider { ProgressiveDisclosureMixin getProgressiveDisclosureMixin(Context context, DashboardFragment fragment); /** * Returns additional intent filter action for dashboard tiles */ String getExtraIntentAction(); } src/com/android/settings/dashboard/DashboardFeatureProviderImpl.java +7 −1 Original line number Diff line number Diff line Loading @@ -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 Loading Loading @@ -182,4 +183,9 @@ public class DashboardFeatureProviderImpl implements DashboardFeatureProvider { DashboardFragment fragment) { return new ProgressiveDisclosureMixin(context, this, fragment); } @Override public String getExtraIntentAction() { return null; } } tests/robotests/src/com/android/settings/dashboard/DashboardFeatureProviderImplTest.java +5 −0 Original line number Diff line number Diff line Loading @@ -242,4 +242,9 @@ public class DashboardFeatureProviderImplTest { CategoryKey.CATEGORY_HOMEPAGE).isEmpty()) .isFalse(); } @Test public void testGetExtraIntentAction_shouldReturnNull() { assertThat(mImpl.getExtraIntentAction()).isNull(); } } Loading
res/xml/development_prefs.xml +4 −0 Original line number Diff line number Diff line Loading @@ -380,4 +380,8 @@ android:title="@string/reset_shortcut_manager_throttling" /> </PreferenceCategory> <PreferenceCategory android:key="dashboard_tile_placeholder" android:order="200"/> </PreferenceScreen>
src/com/android/settings/dashboard/DashboardFeatureProvider.java +4 −0 Original line number Diff line number Diff line Loading @@ -88,5 +88,9 @@ public interface DashboardFeatureProvider { ProgressiveDisclosureMixin getProgressiveDisclosureMixin(Context context, DashboardFragment fragment); /** * Returns additional intent filter action for dashboard tiles */ String getExtraIntentAction(); }
src/com/android/settings/dashboard/DashboardFeatureProviderImpl.java +7 −1 Original line number Diff line number Diff line Loading @@ -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 Loading Loading @@ -182,4 +183,9 @@ public class DashboardFeatureProviderImpl implements DashboardFeatureProvider { DashboardFragment fragment) { return new ProgressiveDisclosureMixin(context, this, fragment); } @Override public String getExtraIntentAction() { return null; } }
tests/robotests/src/com/android/settings/dashboard/DashboardFeatureProviderImplTest.java +5 −0 Original line number Diff line number Diff line Loading @@ -242,4 +242,9 @@ public class DashboardFeatureProviderImplTest { CategoryKey.CATEGORY_HOMEPAGE).isEmpty()) .isFalse(); } @Test public void testGetExtraIntentAction_shouldReturnNull() { assertThat(mImpl.getExtraIntentAction()).isNull(); } }