[DO NOT MERGE] Support native shared libs - CTS

Add the shared libs that are APKs to the native library
path when creating application class loaders. Also don't
allow shared libraries hosting native libs to request
extraction of the native libs out of the APK. Lastly,
shared libraries hosting native libs must be declared
as multi-architecture.

Test: These are the tests :)

bug:62720360

Change-Id: Ie673f1c58083e8bbff9d76ccec68ca08c903d8a1
diff --git a/hostsidetests/os/test-apps/StaticSharedNativeLibProvider/Android.mk b/hostsidetests/os/test-apps/StaticSharedNativeLibProvider/Android.mk
new file mode 100644
index 0000000..bc09dc4
--- /dev/null
+++ b/hostsidetests/os/test-apps/StaticSharedNativeLibProvider/Android.mk
@@ -0,0 +1,63 @@
+#
+# Copyright (C) 2017 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.
+#
+
+LOCAL_PATH := $(call my-dir)
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_TAGS := tests
+
+LOCAL_SRC_FILES := $(call all-java-files-under, src)
+
+LOCAL_JNI_SHARED_LIBRARIES := libstaticsharednativelibprovider
+
+LOCAL_PACKAGE_NAME := CtsStaticSharedNativeLibProvider
+
+LOCAL_COMPATIBILITY_SUITE := cts
+
+LOCAL_PROGUARD_ENABLED := disabled
+
+LOCAL_AAPT_FLAGS := --shared-lib
+
+LOCAL_EXPORT_PACKAGE_RESOURCES := true
+
+LOCAL_MULTILIB := both
+
+LOCAL_CERTIFICATE := cts/hostsidetests/appsecurity/certs/keysets/cts-keyset-test-b
+
+include $(BUILD_CTS_SUPPORT_PACKAGE)
+
+#########################################################################
+# Build Shared Library
+#########################################################################
+
+LOCAL_PATH:= $(LOCAL_PATH)/native
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_TAGS := tests
+
+LOCAL_CFLAGS := -Wall -Wextra -Werror
+
+LOCAL_SRC_FILES := $(call all-cpp-files-under)
+
+LOCAL_MODULE := libstaticsharednativelibprovider
+
+LOCAL_C_INCLUDES := $(LOCAL_PATH)/native/version.h
+
+LOCAL_CXX_STL := none
+
+include $(BUILD_SHARED_LIBRARY)