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

Commit 71489ae4 authored by Remi NGUYEN VAN's avatar Remi NGUYEN VAN
Browse files

Bump NetworkStack to SDK 31

 - Set build SDK to module_31 instead of system_30 in release
   target
 - Set target SDK to 31 in release target instead of 30
 - Update version codes as per convention
 - Move "current" shim library to api31 shims
 - Add new "current" shim library for next development SDK

Ignore-AOSP-First: SDK 31 does not exist in AOSP. Will be partially
                   cherry-picked.

Bug: 189581241
Test: atest NetworkStackTests NetworkStackNextTests \
        CtsNetTestCasesLatestSdk

Change-Id: Ia55598123a5d4432464e9d1b1c637e9e0b58dd8e
parent c74cff84
Loading
Loading
Loading
Loading
+31 −3
Original line number Original line Diff line number Diff line
@@ -53,9 +53,14 @@ java_defaults {


java_defaults {
java_defaults {
    name: "NetworkStackReleaseApiLevel",
    name: "NetworkStackReleaseApiLevel",
    sdk_version: "system_30",
    sdk_version: "module_31",
    min_sdk_version: "29",
    min_sdk_version: "29",
    target_sdk_version: "30",
    target_sdk_version: "31",
    libs: [
        "framework-connectivity",
        "framework-statsd",
        "framework-wifi",
    ]
}
}


// Libraries for the API shims
// Libraries for the API shims
@@ -133,6 +138,27 @@ java_library {
        "NetworkStackApi30Shims",
        "NetworkStackApi30Shims",
        "framework-connectivity",
        "framework-connectivity",
    ],
    ],
    sdk_version: "module_31",
    visibility: ["//visibility:private"],
}


// Shims for APIs being added to the current development version of Android. These APIs are not
// stable and have no defined version number. These could be called 10000, but they use the next
// integer so if the next SDK release happens to use that integer, we don't need to rename them.
java_library {
    name: "NetworkStackApi32Shims",
    defaults: ["NetworkStackShimsDefaults"],
    srcs: [
        "apishim/32/**/*.java",
    ],
    libs: [
        "NetworkStackShimsCommon",
        "NetworkStackApi29Shims",
        "NetworkStackApi30Shims",
        "NetworkStackApi31Shims",
        "framework-connectivity",
    ],
    sdk_version: "module_current",
    sdk_version: "module_current",
    visibility: ["//visibility:private"],
    visibility: ["//visibility:private"],
}
}
@@ -148,6 +174,7 @@ java_library {
        "NetworkStackApi29Shims",
        "NetworkStackApi29Shims",
        "NetworkStackApi30Shims",
        "NetworkStackApi30Shims",
        "NetworkStackApi31Shims",
        "NetworkStackApi31Shims",
        "NetworkStackApi32Shims",
    ],
    ],
    sdk_version: "module_current",
    sdk_version: "module_current",
    visibility: [
    visibility: [
@@ -166,9 +193,10 @@ java_library {
        "NetworkStackShimsCommon",
        "NetworkStackShimsCommon",
        "NetworkStackApi29Shims",
        "NetworkStackApi29Shims",
        "NetworkStackApi30Shims",
        "NetworkStackApi30Shims",
        "NetworkStackApi31Shims",
    ],
    ],
    jarjar_rules: "apishim/jarjar-rules-compat.txt",
    jarjar_rules: "apishim/jarjar-rules-compat.txt",
    sdk_version: "system_30",
    sdk_version: "module_31",
    visibility: [
    visibility: [
        "//packages/modules/Connectivity/Tethering",
        "//packages/modules/Connectivity/Tethering",
        "//packages/modules/Connectivity/tests/cts/net",
        "//packages/modules/Connectivity/tests/cts/net",
+2 −2
Original line number Original line Diff line number Diff line
@@ -19,8 +19,8 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
  package="com.android.networkstack"
  package="com.android.networkstack"
  android:sharedUserId="android.uid.networkstack"
  android:sharedUserId="android.uid.networkstack"
  android:versionCode="309999900"
  android:versionCode="319999900"
  android:versionName="r_aml_309999900"
  android:versionName="s_aml_319999900"
>
>
    <!-- Permissions must be defined here, and not in the base manifest, as the network stack
    <!-- Permissions must be defined here, and not in the base manifest, as the network stack
         running in the system server process does not need any permission, and having privileged
         running in the system server process does not need any permission, and having privileged
+2 −2
Original line number Original line Diff line number Diff line
@@ -17,6 +17,6 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
          package="com.android.networkstack"
          package="com.android.networkstack"
          android:sharedUserId="android.uid.networkstack"
          android:sharedUserId="android.uid.networkstack"
          android:versionCode="310000000"
          android:versionCode="320000000"
          android:versionName="S-next">
          android:versionName="T-next">
</manifest>
</manifest>
+1 −1
Original line number Original line Diff line number Diff line
@@ -14,7 +14,7 @@
 * limitations under the License.
 * limitations under the License.
 */
 */


package com.android.networkstack.apishim;
package com.android.networkstack.apishim.api31;


import android.net.CaptivePortalData;
import android.net.CaptivePortalData;
import android.net.Uri;
import android.net.Uri;
+1 −1
Original line number Original line Diff line number Diff line
@@ -14,7 +14,7 @@
 * limitations under the License.
 * limitations under the License.
 */
 */


package com.android.networkstack.apishim;
package com.android.networkstack.apishim.api31;


import static com.android.modules.utils.build.SdkLevel.isAtLeastS;
import static com.android.modules.utils.build.SdkLevel.isAtLeastS;


Loading