Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit dea70354 authored by Doris Ling's avatar Doris Ling Committed by Android (Google) Code Review
Browse files

Merge "Add new method getExtraIntentAction() in DashboardFeatureProvider."

parents a4ddf572 3d9224fd
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -380,4 +380,8 @@
            android:title="@string/reset_shortcut_manager_throttling" />
     </PreferenceCategory>

    <PreferenceCategory
      android:key="dashboard_tile_placeholder"
      android:order="200"/>

</PreferenceScreen>
+4 −0
Original line number Diff line number Diff line
@@ -88,5 +88,9 @@ public interface DashboardFeatureProvider {
    ProgressiveDisclosureMixin getProgressiveDisclosureMixin(Context context,
            DashboardFragment fragment);

    /**
     * Returns additional intent filter action for dashboard tiles
     */
    String getExtraIntentAction();

}
+7 −1
Original line number Diff line number Diff line
@@ -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;
    }
}
+5 −0
Original line number Diff line number Diff line
@@ -242,4 +242,9 @@ public class DashboardFeatureProviderImplTest {
                CategoryKey.CATEGORY_HOMEPAGE).isEmpty())
                .isFalse();
    }

    @Test
    public void testGetExtraIntentAction_shouldReturnNull() {
        assertThat(mImpl.getExtraIntentAction()).isNull();
    }
}