Remove org.apache.http.legacy from bootclasspath
Updates the tests to work when org.apache.http.legacy is no longer on the
bootclasspath.
1) Added new test to verify that the org.apache.http classes are visible
to an APK that is targeted at an earlier release (27).
2) Modified CtsApacheHttpLegacyCurrentApiSignatureTestCases to verify
that the org.apache.http classes are not visible to an APK that is
targeted at the current release.
3) Added new test to verify that the org.apache.http classes are visible
to an APK that is targeted at the current release which has a
<uses-library android:name="org.apache.http.legacy"/> entry in its
manifest.
Change-Id: Id405add9e560c91d513649c2aeebc6ec24cb77ba
Test: cts/tests/signature/runSignatureTests.sh
Bug: 18027885
diff --git a/tests/signature/api-check/apache-http-legacy-27-api/AndroidManifest.xml b/tests/signature/api-check/apache-http-legacy-27-api/AndroidManifest.xml
new file mode 100644
index 0000000..ae69f52
--- /dev/null
+++ b/tests/signature/api-check/apache-http-legacy-27-api/AndroidManifest.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ * Copyright (C) 2018 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.signature.cts.api.apache_http_legacy_27">
+ <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
+ <uses-permission android:name="android.permission.READ_PHONE_STATE"/>
+
+ <uses-sdk android:minSdkVersion="22" android:targetSdkVersion="27"/>
+
+ <application/>
+
+ <instrumentation android:name="repackaged.android.test.InstrumentationTestRunner"
+ android:targetPackage="android.signature.cts.api.apache_http_legacy_27"
+ android:label="Apache Http Legacy 27 API Signature Test"/>
+
+</manifest>