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

Commit 7dd2f6b5 authored by Vinit Deshpande's avatar Vinit Deshpande
Browse files

Bring in passpoint code [DO NOT MERGE]

This change brings in all the passpoint code from master
to here - so that all development can be done with partners

Change-Id: I9185c35c69630ffb9b4313f973893996051075ed
parent f45acfe0
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -386,6 +386,7 @@ LOCAL_SRC_FILES += \
	wifi/java/android/net/wifi/p2p/IWifiP2pManager.aidl \
	wifi/java/android/net/wifi/IWifiScanner.aidl \
	wifi/java/android/net/wifi/IRttManager.aidl \
	wifi/java/android/net/wifi/passpoint/IWifiPasspointManager.aidl \
	packages/services/PacProcessor/com/android/net/IProxyService.aidl \
	packages/services/Proxy/com/android/net/IProxyCallback.aidl \
	packages/services/Proxy/com/android/net/IProxyPortListener.aidl \
+20 −0
Original line number Diff line number Diff line
@@ -16,6 +16,8 @@

package android.net.wifi;

import android.net.wifi.passpoint.WifiPasspointInfo;
import android.net.wifi.passpoint.WifiPasspointManager;
import android.os.Parcel;
import android.os.Parcelable;

@@ -168,6 +170,13 @@ public class ScanResult implements Parcelable {
     */
    public int distanceSdCm;

    /**
     * Passpoint ANQP information. This is not fetched automatically.
     * Use {@link WifiPasspointManager#requestAnqpInfo} to request ANQP info.
     * {@hide}
     */
    public WifiPasspointInfo passpoint;

    /**
     * {@hide}
     */
@@ -264,6 +273,7 @@ public class ScanResult implements Parcelable {
            distanceCm = source.distanceCm;
            distanceSdCm = source.distanceSdCm;
            seen = source.seen;
            passpoint = source.passpoint;
            autoJoinStatus = source.autoJoinStatus;
            untrusted = source.untrusted;
            numConnection = source.numConnection;
@@ -303,6 +313,7 @@ public class ScanResult implements Parcelable {
        sb.append(", distanceSd: ").append((distanceSdCm != UNSPECIFIED ? distanceSdCm : "?")).
                append("(cm)");

        sb.append(", passpoint: ").append(passpoint != null ? "yes" : "no");
        if (autoJoinStatus != 0) {
            sb.append(", status: ").append(autoJoinStatus);
        }
@@ -336,6 +347,12 @@ public class ScanResult implements Parcelable {
        dest.writeInt(numUsage);
        dest.writeInt(numIpConfigFailures);
        dest.writeInt(isAutoJoinCandidate);
        if (passpoint != null) {
            dest.writeInt(1);
            passpoint.writeToParcel(dest, flags);
        } else {
            dest.writeInt(0);
        }
        if (informationElements != null) {
            dest.writeInt(informationElements.length);
            for (int i = 0; i < informationElements.length; i++) {
@@ -373,6 +390,9 @@ public class ScanResult implements Parcelable {
                sr.numUsage = in.readInt();
                sr.numIpConfigFailures = in.readInt();
                sr.isAutoJoinCandidate = in.readInt();
                if (in.readInt() == 1) {
                    sr.passpoint = WifiPasspointInfo.CREATOR.createFromParcel(in);
                }
                int n = in.readInt();
                if (n != 0) {
                    sr.informationElements = new InformationElement[n];
+45 −0
Original line number Diff line number Diff line
/**
 * Copyright (c) 2014, 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.wifi.passpoint;

import android.net.wifi.ScanResult;
import android.net.wifi.passpoint.WifiPasspointPolicy;
import android.net.wifi.passpoint.WifiPasspointCredential;
import android.os.Messenger;

/**
 * Interface that allows controlling and querying Wifi Passpoint connectivity.
 *
 * {@hide}
 */
interface IWifiPasspointManager
{
    Messenger getMessenger();

    int getPasspointState();

    List<WifiPasspointPolicy> requestCredentialMatch(in List<ScanResult> requested);

    List<WifiPasspointCredential> getCredentials();

    boolean addCredential(in WifiPasspointCredential cred);

    boolean updateCredential(in WifiPasspointCredential cred);

    boolean removeCredential(in WifiPasspointCredential cred);
}
+19 −0
Original line number Diff line number Diff line
/**
 * Copyright (c) 2014, 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.wifi.passpoint;

parcelable WifiPasspointCredential;
+667 −0

File added.

Preview size limit exceeded, changes collapsed.

Loading