Add new method getExtraIntentAction() in DashboardFeatureProvider.
Add a new method to get the extra intent-filter action to be used to query the dynamic dashboard tiles. Bug: 32739952 Test: make RunSettingsRoboTests Change-Id: I96d9d8bd32ebe34b7c0df00c3fb4d8900b476c94
This commit is contained in:
@@ -380,4 +380,8 @@
|
|||||||
android:title="@string/reset_shortcut_manager_throttling" />
|
android:title="@string/reset_shortcut_manager_throttling" />
|
||||||
</PreferenceCategory>
|
</PreferenceCategory>
|
||||||
|
|
||||||
|
<PreferenceCategory
|
||||||
|
android:key="dashboard_tile_placeholder"
|
||||||
|
android:order="200"/>
|
||||||
|
|
||||||
</PreferenceScreen>
|
</PreferenceScreen>
|
||||||
|
@@ -88,5 +88,9 @@ public interface DashboardFeatureProvider {
|
|||||||
ProgressiveDisclosureMixin getProgressiveDisclosureMixin(Context context,
|
ProgressiveDisclosureMixin getProgressiveDisclosureMixin(Context context,
|
||||||
DashboardFragment fragment);
|
DashboardFragment fragment);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns additional intent filter action for dashboard tiles
|
||||||
|
*/
|
||||||
|
String getExtraIntentAction();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -51,7 +51,8 @@ public class DashboardFeatureProviderImpl implements DashboardFeatureProvider {
|
|||||||
private final CategoryManager mCategoryManager;
|
private final CategoryManager mCategoryManager;
|
||||||
|
|
||||||
public DashboardFeatureProviderImpl(Context context) {
|
public DashboardFeatureProviderImpl(Context context) {
|
||||||
this(context.getApplicationContext(), CategoryManager.get(context));
|
mContext = context;
|
||||||
|
mCategoryManager = CategoryManager.get(context, getExtraIntentAction());
|
||||||
}
|
}
|
||||||
|
|
||||||
@VisibleForTesting
|
@VisibleForTesting
|
||||||
@@ -182,4 +183,9 @@ public class DashboardFeatureProviderImpl implements DashboardFeatureProvider {
|
|||||||
DashboardFragment fragment) {
|
DashboardFragment fragment) {
|
||||||
return new ProgressiveDisclosureMixin(context, this, fragment);
|
return new ProgressiveDisclosureMixin(context, this, fragment);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getExtraIntentAction() {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@@ -242,4 +242,9 @@ public class DashboardFeatureProviderImplTest {
|
|||||||
CategoryKey.CATEGORY_HOMEPAGE).isEmpty())
|
CategoryKey.CATEGORY_HOMEPAGE).isEmpty())
|
||||||
.isFalse();
|
.isFalse();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testGetExtraIntentAction_shouldReturnNull() {
|
||||||
|
assertThat(mImpl.getExtraIntentAction()).isNull();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user