[LSC] Add LOCAL_LICENSE_KINDS to packages/modules/SdkExtensions am: 36ade50bd2 am: 3cfaf3407d am: 00bc803f18

Original change: https://android-review.googlesource.com/c/platform/packages/modules/SdkExtensions/+/1643244

Change-Id: I9c73b130cc303e27a49ef3ed50251a638ffccccb
diff --git a/Android.bp b/Android.bp
index 87a811e..e6302aa 100644
--- a/Android.bp
+++ b/Android.bp
@@ -20,10 +20,7 @@
 apex {
     name: "com.android.sdkext",
     defaults: [ "com.android.sdkext-defaults" ],
-    binaries: [
-        "derive_classpath",
-        "derive_sdk",
-    ],
+    binaries: [ "derive_sdk" ],
     java_libs: [ "framework-sdkextensions" ],
     prebuilts: [
         "cur_sdkinfo",
@@ -38,7 +35,6 @@
     updatable: true,
     min_sdk_version: "30",
     prebuilts: [
-        "derive_classpath.rc",
         "derive_sdk.rc",
     ],
     key: "com.android.sdkext.key",
diff --git a/derive_classpath/.clang-format b/derive_classpath/.clang-format
deleted file mode 120000
index 86b1593..0000000
--- a/derive_classpath/.clang-format
+++ /dev/null
@@ -1 +0,0 @@
-../../../../build/soong/scripts/system-clang-format-2
\ No newline at end of file
diff --git a/derive_classpath/Android.bp b/derive_classpath/Android.bp
deleted file mode 100644
index 26535af..0000000
--- a/derive_classpath/Android.bp
+++ /dev/null
@@ -1,67 +0,0 @@
-// Copyright (C) 2019 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 {
-    default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
-cc_defaults {
-    name: "derive_classpath-defaults",
-    min_sdk_version: "30",
-    shared_libs: ["liblog"],
-    // static c++/libbase for smaller size
-    stl: "c++_static",
-    static_libs: [
-        "libbase",
-        "libmodules-utils-build",
-        "libprotobuf-cpp-lite",
-    ],
-}
-
-cc_library {
-    name: "libderive_classpath",
-    srcs: ["derive_classpath.cpp"],
-    defaults: ["derive_classpath-defaults"],
-    apex_available: ["com.android.sdkext"],
-}
-
-cc_defaults {
-    name: "derive_classpath_binary-defaults",
-    defaults: ["derive_classpath-defaults"],
-    srcs: ["main.cpp"],
-    static_libs: ["libderive_classpath"],
-}
-
-cc_binary {
-    name: "derive_classpath",
-    defaults: ["derive_classpath_binary-defaults"],
-    apex_available: ["com.android.sdkext"],
-}
-
-// Work around testing using a 64-bit test suite on 32-bit test device by
-// using a prefer32 version of derive_sdk in testing.
-cc_binary {
-    name: "derive_classpath_prefer32",
-    defaults: ["derive_classpath_binary-defaults"],
-    compile_multilib: "prefer32",
-    stem: "derive_classpath",
-    apex_available: ["test_com.android.sdkext"],
-    installable: false,
-}
-
-prebuilt_etc {
-    name: "derive_classpath.rc",
-    src: "derive_classpath.rc",
-    installable: false,
-}
diff --git a/derive_classpath/derive_classpath.cpp b/derive_classpath/derive_classpath.cpp
deleted file mode 100644
index b20dfe0..0000000
--- a/derive_classpath/derive_classpath.cpp
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Copyright (C) 2021 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.
- */
-
-#include "derive_classpath.h"
-#include <android-base/file.h>
-#include <android-base/logging.h>
-
-namespace android {
-namespace derive_classpath {
-
-static const std::string kBaseClasspathExportsFilepath = "/system/etc/classpath";
-static const std::string kGeneratedClasspathExportsFilepath = "/data/system/environ/classpath";
-
-bool GenerateClasspathExports() {
-  std::string contents;
-  if (!android::base::ReadFileToString(kBaseClasspathExportsFilepath, &contents)) {
-    PLOG(ERROR) << "Failed to read " << kBaseClasspathExportsFilepath;
-    return false;
-  }
-
-  if (!android::base::WriteStringToFile(contents, kGeneratedClasspathExportsFilepath)) {
-    PLOG(ERROR) << "Failed to write " << kGeneratedClasspathExportsFilepath;
-  }
-
-  return true;
-}
-
-}  // namespace derive_classpath
-}  // namespace android
diff --git a/derive_classpath/derive_classpath.h b/derive_classpath/derive_classpath.h
deleted file mode 100644
index ea75c37..0000000
--- a/derive_classpath/derive_classpath.h
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * Copyright (C) 2021 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.
- */
-
-#pragma once
-
-#include <string>
-
-namespace android {
-namespace derive_classpath {
-
-bool GenerateClasspathExports();
-
-}  // namespace derive_classpath
-}  // namespace android
diff --git a/derive_classpath/derive_classpath.rc b/derive_classpath/derive_classpath.rc
deleted file mode 100644
index 262b89e..0000000
--- a/derive_classpath/derive_classpath.rc
+++ /dev/null
@@ -1,5 +0,0 @@
-service derive_classpath /apex/com.android.sdkext/bin/derive_classpath
-    user system
-    group system
-    oneshot
-    disabled
diff --git a/derive_classpath/main.cpp b/derive_classpath/main.cpp
deleted file mode 100644
index 71e11e7..0000000
--- a/derive_classpath/main.cpp
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * Copyright (C) 2021 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.
- */
-
-#include <cstdlib>
-
-#include "derive_classpath.h"
-
-int main(int, char**) {
-  if (!android::derive_classpath::GenerateClasspathExports()) {
-    return EXIT_FAILURE;
-  }
-  return EXIT_SUCCESS;
-}
diff --git a/framework/java/android/os/ext/SdkExtensions.java b/framework/java/android/os/ext/SdkExtensions.java
index 299a0d9..171eff8 100644
--- a/framework/java/android/os/ext/SdkExtensions.java
+++ b/framework/java/android/os/ext/SdkExtensions.java
@@ -50,7 +50,7 @@
      * Values suitable as parameters for {@link #getExtensionVersion(int)}.
      * @hide
      */
-    @IntDef(value = { VERSION_CODES.R, VERSION_CODES.CUR_DEVELOPMENT })
+    @IntDef(value = { VERSION_CODES.R, VERSION_CODES.S })
     @Retention(RetentionPolicy.SOURCE)
     public @interface SdkVersion {}
 
@@ -71,7 +71,7 @@
         if (sdk == VERSION_CODES.R) {
             return R_EXTENSION_INT;
         }
-        if (sdk == VERSION_CODES.CUR_DEVELOPMENT) {
+        if (sdk == VERSION_CODES.S) {
             return S_EXTENSION_INT;
         }
         return 0;
diff --git a/manifest.json b/manifest.json
index deeb29e..7c089da 100644
--- a/manifest.json
+++ b/manifest.json
@@ -1,4 +1,4 @@
 {
   "name": "com.android.sdkext",
-  "version": 300000000
+  "version": 309999900
 }
diff --git a/testing/Android.bp b/testing/Android.bp
index 46c40e1..6abdd5a 100644
--- a/testing/Android.bp
+++ b/testing/Android.bp
@@ -29,10 +29,7 @@
     installable: false, // Should never be installed on the systemimage
     multilib: {
         prefer32: {
-            binaries: [
-                "derive_classpath_prefer32",
-                "derive_sdk_prefer32",
-            ],
+            binaries: ["derive_sdk_prefer32"],
         },
     },
     // The automated test infra ends up building this apex for 64+32-bit and