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

Commit b228df32 authored by Udam Saini's avatar Udam Saini
Browse files

Allows features to link to other feature splits without namespacing.

Add uses-split dependencies to AppInfo. At link time, this is used
and allows features to reference other features, before
resource namespacing is implemented in Android Studio.

bug:135681292
Test: Link_test, ReferenceLinker_test, and integration tests.
Change-Id: Ifdf0067e7370552b6b9d4d6d4713d4484b6ea154
parent 9aeeb3e5
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -18,7 +18,7 @@ android_test {
    name: "FeatureSplit1",
    srcs: ["**/*.java"],
    sdk_version: "current",
    libs: ["FeatureSplitBase"],
    libs: ["FeatureSplitBase", "FeatureSplit2"],
    aaptflags: [
        "--package-id",
        "0x80",
+1 −0
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@
    featureSplit="feature1">

    <uses-sdk android:minSdkVersion="21" />
    <uses-split android:name="feature2" />

    <application>
        <activity android:name=".one.One" android:label="Feature One">
+2 −1
Original line number Diff line number Diff line
@@ -2,4 +2,5 @@
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/text"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content" />
    android:layout_height="wrap_content"
    android:text="@string/feature2_string" />
+2 −1
Original line number Diff line number Diff line
@@ -21,6 +21,7 @@
    <color name="test_color2">#00ff00</color>
    <string-array name="string_array2">
      <item>@string/app_title</item>
      <item>@string/feature2_string</item>
    </string-array>
</resources>
+2 −1
Original line number Diff line number Diff line
@@ -15,6 +15,7 @@
-->

<resources>
    <string name="feature2_string">feature 2 string referenced from feature 1</string>
    <integer name="test_integer3">300</integer>
    <color name="test_color3">#0000ff</color>
    <string-array name="string_array3">
Loading