To avoid some Tablet/Phone wiring, I want my app to issue itself an intent via an activity-alias, and make the manifest system deliver it to the main activity (for tablet) or a new activity (for phone).
If I have this in my manifest:
<activity-alias android:name="my.app.WebContent"
android:targetActivity="my.app.activities.Home"/>
then all is well, and
Intent {
act=android.intent.action.VIEW dat=http://www.app.my/url
cmp=my.app/.WebContent (has extras) }
is delivered as expected.
If, however, I have this in my manifest:
<activity-alias android:name="my.app.WebContent"
android:enabled="@bool/has_one_pane"
android:targetActivity="my.app.activities.WebContent"/>
<activity-alias android:name="my.app.WebContent"
android:enabled="@bool/has_two_panes"
android:targetActivity="my.app.activities.Home"/>
with this in values/res.xml
<resources>
<bool name="has_two_panes">false</bool>
<bool name="has_one_pane">true</bool>
</resources>
and this in values-large/res.xml, and values-sw600dp/res.xml:
<resources>
<item type="layout" name="content_frame">@layout/activity_item_twopane</item>
<bool name="has_two_panes">true</bool>
<bool name="has_one_pane">false</bool>
</resources>
then my code filters out the intent as 'undeliverable' according to PackageManager.resolveActivity().
It seems that values/res.xml overrides values-anything/res.xml, even though values-large is supposed to override values/res.xml for large displays.
Is this a bug in Android, or have I misunderstood how this should be done?