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

Commit ec8846b2 authored by Mike Yu's avatar Mike Yu Committed by Automerger Merge Worker
Browse files

Extend ResolverParamsParcel for DoH information am: aa97b738

parents 4240b234 aa97b738
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -151,7 +151,7 @@ aidl_interface {
        },

    ],
    frozen: true,
    frozen: false,

}

+1 −0
Original line number Diff line number Diff line
@@ -36,4 +36,5 @@ parcelable ResolverParamsParcel {
  @nullable android.net.ResolverOptionsParcel resolverOptions;
  int[] transportTypes = {};
  boolean meteredNetwork = false;
  @nullable android.net.resolv.aidl.DohParamsParcel dohParams;
}
+27 −0
Original line number Diff line number Diff line
///////////////////////////////////////////////////////////////////////////////
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE.                          //
///////////////////////////////////////////////////////////////////////////////

// This file is a snapshot of an AIDL file. Do not edit it manually. There are
// two cases:
// 1). this is a frozen version file - do not edit this in any case.
// 2). this is a 'current' file. If you make a backwards compatible change to
//     the interface (from the latest frozen version), the build system will
//     prompt you to update this file with `m <name>-update-api`.
//
// You must not make a backward incompatible change to any AIDL file built
// with the aidl_interface module type with versions property set. The module
// type is used to build AIDL files in a way that they can be used across
// independently updatable components of the system. If a device is shipped
// with such a backward incompatible change, it has a high risk of breaking
// later when a module using the interface is updated, e.g., Mainline modules.

package android.net.resolv.aidl;
/* @hide */
@JavaDerive(equals=true, toString=true) @JavaOnlyImmutable
parcelable DohParamsParcel {
  String name = "";
  String[] ips = {};
  String dohpath = "";
  int port = (-1) /* -1 */;
}
+7 −0
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@
package android.net;

import android.net.ResolverOptionsParcel;
import android.net.resolv.aidl.DohParamsParcel;

/**
 * Configuration for a resolver parameters.
@@ -118,4 +119,10 @@ parcelable ResolverParamsParcel {
     * Whether the network is metered or not.
     */
    boolean meteredNetwork = false;

    /**
     * Information about DNS-over-HTTPS servers to use
     */
    @nullable
    DohParamsParcel dohParams;
}
+50 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2023 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 android.net.resolv.aidl;

/**
 * DNS-over-HTTPS configuration parameters. Represents a single DoH server.
 *
 * Note that although this parcelable is for DNS-over-HTTPS configuration parameters, there is
 * no field in this parcelable to specify an exact HTTPS protocol (h2 or h3) because DnsResolver
 * only supports DNS-over-HTTPS/3. The configuration parameters are for h3.
 *
 * {@hide}
 */
@JavaDerive(equals=true, toString=true) @JavaOnlyImmutable
parcelable DohParamsParcel {
    /**
     * The server hostname.
     */
     String name = "";

    /**
     * The server IP addresses. They are not sorted.
     */
     String[] ips = {};

    /**
     * A part of the URI template used to construct the URL for DNS resolution.
     * It's derived only from DNS SVCB SvcParamKey "dohpath".
     */
     String dohpath = "";

    /**
     * The port used to reach the servers.
     */
     int port = -1;
}