diff options
author | 2023-08-18 15:36:01 +0000 | |
---|---|---|
committer | 2023-08-18 15:36:01 +0000 | |
commit | 6caa7cbbec81b2304fea3a98950d202002e98ac1 (patch) | |
tree | c1406b4f28f026d529265272f294eb8be3fb99c9 | |
parent | 1c44169634fa91ebac2a8f78ba6bc992f3550628 (diff) | |
parent | f7fa7a342a0a831fefe34c492b99005b9c4833c7 (diff) |
Merge "Add CtsShimAddApkToApex app" into main am: c947eb92e6 am: f7fa7a342a
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2715533
Change-Id: I4187feb2da915cef04de062f62ed51c3d6840c88
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
3 files changed, 92 insertions, 0 deletions
diff --git a/packages/CtsShim/build/Android.bp b/packages/CtsShim/build/Android.bp index d778febe9faf..d6b7ecf5819d 100644 --- a/packages/CtsShim/build/Android.bp +++ b/packages/CtsShim/build/Android.bp @@ -208,3 +208,22 @@ android_app { ], min_sdk_version: "24", } + +//########################################################## +// Variant: Add apk to an apex +android_app { + name: "CtsShimAddApkToApex", + sdk_version: "current", + srcs: ["shim_add_apk_to_apex/src/android/addapktoapex/app/AddApkToApexDeviceActivity.java"], + optimize: { + enabled: false, + }, + dex_preopt: { + enabled: false, + }, + manifest: "shim_add_apk_to_apex/AndroidManifestAddApkToApex.xml", + apex_available: [ + "//apex_available:platform", + "com.android.apex.cts.shim.v2_add_apk_to_apex", + ], +} diff --git a/packages/CtsShim/build/shim_add_apk_to_apex/AndroidManifestAddApkToApex.xml b/packages/CtsShim/build/shim_add_apk_to_apex/AndroidManifestAddApkToApex.xml new file mode 100644 index 000000000000..0e620b062ed6 --- /dev/null +++ b/packages/CtsShim/build/shim_add_apk_to_apex/AndroidManifestAddApkToApex.xml @@ -0,0 +1,31 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + * Copyright (C) 2023 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. + --> + +<manifest xmlns:android="http://schemas.android.com/apk/res/android" + package="android.addapktoapex.app"> + + <application> + <activity android:name=".AddApkToApexDeviceActivity" + android:exported="true"> + <intent-filter> + <action android:name="android.intent.action.MAIN"/> + <category android:name="android.intent.category.LAUNCHER"/> + </intent-filter> + </activity> + </application> + +</manifest>
\ No newline at end of file diff --git a/packages/CtsShim/build/shim_add_apk_to_apex/src/android/addapktoapex/app/AddApkToApexDeviceActivity.java b/packages/CtsShim/build/shim_add_apk_to_apex/src/android/addapktoapex/app/AddApkToApexDeviceActivity.java new file mode 100644 index 000000000000..c68904b30d6a --- /dev/null +++ b/packages/CtsShim/build/shim_add_apk_to_apex/src/android/addapktoapex/app/AddApkToApexDeviceActivity.java @@ -0,0 +1,42 @@ +/* + * Copyright (C) 2023 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 android.addapktoapex.app; + +import android.app.Activity; +import android.os.Bundle; +import android.util.Log; + +/** + * A simple activity which logs to Logcat. + */ +public class AddApkToApexDeviceActivity extends Activity { + + private static final String TAG = AddApkToApexDeviceActivity.class.getSimpleName(); + + /** + * The test string to log. + */ + private static final String TEST_STRING = "AddApkToApexTestString"; + + @Override + public void onCreate(Bundle icicle) { + super.onCreate(icicle); + // Log the test string to Logcat. + Log.i(TAG, TEST_STRING); + } + +} |