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

Commit e05d8fb9 authored by Adam Lesinski's avatar Adam Lesinski
Browse files

Fix FeatureSplit tests to work properly with Java code

Change-Id: I2f6d770c860c05e0d5a407fd76dc59dd748e3c3f
parent 44859db7
Loading
Loading
Loading
Loading
+10 −2
Original line number Original line Diff line number Diff line
@@ -16,7 +16,15 @@


<manifest xmlns:android="http://schemas.android.com/apk/res/android"
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.android.test.split.feature">
    package="com.android.test.split.feature">
    <application android:label="@string/app_title"

        android:hasCode="false">
    <uses-sdk android:minSdkVersion="21" />

    <application android:label="@string/app_title">
        <activity android:name=".ActivityMain" android:label="Feature Base">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    </application>
    </application>
</manifest>
</manifest>
+11 −0
Original line number Original line Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:padding="16dp">
    <TextView android:id="@+id/text"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_centerInParent="true"
        android:textAppearance="?android:textAppearanceLarge" />
</RelativeLayout>
+1 −0
Original line number Original line Diff line number Diff line
@@ -16,6 +16,7 @@


<resources>
<resources>
    <string name="app_title">FeatureSplit APK</string>
    <string name="app_title">FeatureSplit APK</string>
    <string name="base">Base</string>


    <item type="id" name="test_id"/>
    <item type="id" name="test_id"/>
    <integer name="test_integer">100</integer>
    <integer name="test_integer">100</integer>
+31 −0
Original line number Original line Diff line number Diff line
/*
 * Copyright (C) 2016 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.android.test.split.feature;

import android.app.Activity;
import android.os.Bundle;
import android.widget.TextView;

public class ActivityMain extends Activity {

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        ((TextView) findViewById(R.id.text)).setText(R.string.base);
    }
}
+3 −1
Original line number Original line Diff line number Diff line
@@ -22,10 +22,12 @@ LOCAL_PACKAGE_NAME := FeatureSplit1
LOCAL_MODULE_TAGS := tests
LOCAL_MODULE_TAGS := tests


featureOf := FeatureSplitBase
featureOf := FeatureSplitBase

LOCAL_APK_LIBRARIES := $(featureOf)
featureOfApk := $(call intermediates-dir-for,APPS,$(featureOf))/package.apk
featureOfApk := $(call intermediates-dir-for,APPS,$(featureOf))/package.apk
localRStamp := $(call intermediates-dir-for,APPS,$(LOCAL_PACKAGE_NAME),,COMMON)/src/R.stamp
localRStamp := $(call intermediates-dir-for,APPS,$(LOCAL_PACKAGE_NAME),,COMMON)/src/R.stamp
$(localRStamp): $(featureOfApk)
$(localRStamp): $(featureOfApk)


LOCAL_AAPT_FLAGS := --feature-of $(featureOfApk)
LOCAL_AAPT_FLAGS := --feature-of $(featureOfApk) --custom-package com.android.test.split.feature.one


include $(BUILD_PACKAGE)
include $(BUILD_PACKAGE)
Loading