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

Commit 47db7adc authored by Mark Chien's avatar Mark Chien Committed by Gerrit Code Review
Browse files

Merge "[Tether04] Migrate EntitlementManager into module"

parents 450a38b0 f303c5a8
Loading
Loading
Loading
Loading
+10 −1
Original line number Diff line number Diff line
@@ -21,6 +21,7 @@ java_defaults {
        "src/**/*.java",
        ":framework-tethering-shared-srcs",
        ":services-tethering-shared-srcs",
        ":servicescore-tethering-src",
    ],
    static_libs: [
        "androidx.annotation_annotation",
@@ -67,9 +68,17 @@ android_app {

// This group will be removed when tethering migration is done.
filegroup {
    name: "tethering-services-srcs",
    name: "tethering-servicescore-srcs",
    srcs: [
        "src/com/android/server/connectivity/tethering/EntitlementManager.java",
        "src/com/android/server/connectivity/tethering/TetheringConfiguration.java",
    ],
}

// This group will be removed when tethering migration is done.
filegroup {
    name: "tethering-servicesnet-srcs",
    srcs: [
        "src/android/net/dhcp/DhcpServerCallbacks.java",
        "src/android/net/dhcp/DhcpServingParamsParcelExt.java",
        "src/android/net/ip/IpServer.java",
+1 −4
Original line number Diff line number Diff line
@@ -87,7 +87,6 @@ public class EntitlementManager {
    private static final int EVENT_MAYBE_RUN_PROVISIONING = 3;
    private static final int EVENT_GET_ENTITLEMENT_VALUE = 4;


    // The ArraySet contains enabled downstream types, ex:
    // {@link ConnectivityManager.TETHERING_WIFI}
    // {@link ConnectivityManager.TETHERING_USB}
@@ -112,7 +111,6 @@ public class EntitlementManager {

    public EntitlementManager(Context ctx, StateMachine tetherMasterSM, SharedLog log,
            int permissionChangeMessageCode, MockableSystemProperties systemProperties) {

        mContext = ctx;
        mLog = log.forSubComponent(TAG);
        mCurrentTethers = new ArraySet<Integer>();
@@ -662,7 +660,6 @@ public class EntitlementManager {

    private void handleGetLatestTetheringEntitlementValue(int downstream, ResultReceiver receiver,
            boolean showEntitlementUi) {

        final TetheringConfiguration config = mFetcher.fetchTetheringConfiguration();
        if (!isTetherProvisioningRequired(config)) {
            receiver.send(TETHER_ERROR_NO_ERROR, null);
+5 −1
Original line number Diff line number Diff line
@@ -17,7 +17,10 @@
android_test {
    name: "TetheringTests",
    certificate: "platform",
    srcs: ["src/**/*.java"],
    srcs: [
        ":servicescore-tethering-src",
        "src/**/*.java",
    ],
    test_suites: ["device-tests"],
    static_libs: [
        "androidx.test.rules",
@@ -42,6 +45,7 @@ android_test {
filegroup {
    name: "tethering-tests-src",
    srcs: [
        "src/com/android/server/connectivity/tethering/EntitlementManagerTest.java",
        "src/com/android/server/connectivity/tethering/TetheringConfigurationTest.java",
        "src/android/net/dhcp/DhcpServingParamsParcelExtTest.java",
        "src/android/net/ip/IpServerTest.java",
+0 −0

File moved.

+9 −0
Original line number Diff line number Diff line
@@ -20,6 +20,7 @@ java_library_static {
        ":vold_aidl",
        ":gsiservice_aidl",
        ":platform-compat-config",
        ":tethering-servicescore-srcs",
        "java/com/android/server/EventLogTags.logtags",
        "java/com/android/server/am/EventLogTags.logtags",
        "java/com/android/server/policy/EventLogTags.logtags",
@@ -81,3 +82,11 @@ prebuilt_etc {
    name: "gps_debug.conf",
    src: "java/com/android/server/location/gps_debug.conf",
}

// TODO: this should be removed after tethering migration done.
filegroup {
    name: "servicescore-tethering-src",
    srcs: [
        "java/com/android/server/connectivity/MockableSystemProperties.java",
    ],
}
Loading