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

Commit 98de3a02 authored by Peter Qiu's avatar Peter Qiu Committed by android-build-merger
Browse files

hotspot2: add support for complete PerProviderSubscription/Policy subtree am:...

hotspot2: add support for complete PerProviderSubscription/Policy subtree am: 2d7af45e am: 01e738a0
am: 6251e52c

Change-Id: I1305266ff24105e5b9326868f3212f8a27802fea
parents edf796e8 6251e52c
Loading
Loading
Loading
Loading
+14 −5
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@ package android.net.wifi.hotspot2;

import android.net.wifi.hotspot2.pps.Credential;
import android.net.wifi.hotspot2.pps.HomeSP;
import android.net.wifi.hotspot2.pps.Policy;
import android.os.Parcelable;
import android.os.Parcel;

@@ -28,13 +29,12 @@ import android.os.Parcel;
 * For more info, refer to Hotspot 2.0 PPS MO defined in section 9.1 of the Hotspot 2.0
 * Release 2 Technical Specification.
 *
 * Currently, only HomeSP and Credential subtrees are supported.
 *
 * @hide
 */
public final class PasspointConfiguration implements Parcelable {
    public HomeSP homeSp = null;
    public Credential credential = null;
    public Policy policy = null;

    /**
     * Constructor for creating PasspointConfiguration with default values.
@@ -54,6 +54,9 @@ public final class PasspointConfiguration implements Parcelable {
            if (source.credential != null) {
                credential = new Credential(source.credential);
            }
            if (source.policy != null) {
                policy = new Policy(source.policy);
            }
        }
    }

@@ -66,6 +69,7 @@ public final class PasspointConfiguration implements Parcelable {
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeParcelable(homeSp, flags);
        dest.writeParcelable(credential, flags);
        dest.writeParcelable(policy, flags);
    }

    @Override
@@ -77,9 +81,10 @@ public final class PasspointConfiguration implements Parcelable {
            return false;
        }
        PasspointConfiguration that = (PasspointConfiguration) thatObject;
        return (homeSp == null ? that.homeSp == null : homeSp.equals(that.homeSp)) &&
                (credential == null ? that.credential == null :
                    credential.equals(that.credential));
        return (homeSp == null ? that.homeSp == null : homeSp.equals(that.homeSp))
                && (credential == null ? that.credential == null :
                    credential.equals(that.credential))
                && (policy == null) ? that.policy == null : policy.equals(that.policy);
    }

    /**
@@ -94,6 +99,9 @@ public final class PasspointConfiguration implements Parcelable {
        if (credential == null || !credential.validate()) {
            return false;
        }
        if (policy != null && !policy.validate()) {
            return false;
        }
        return true;
    }

@@ -104,6 +112,7 @@ public final class PasspointConfiguration implements Parcelable {
                PasspointConfiguration config = new PasspointConfiguration();
                config.homeSp = in.readParcelable(null);
                config.credential = in.readParcelable(null);
                config.policy = in.readParcelable(null);
                return config;
            }
            @Override
+452 −1

File changed.

Preview size limit exceeded, changes collapsed.

+19 −0
Original line number Diff line number Diff line
/**
 * Copyright (c) 2017, 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.hotspot2.pps;

parcelable Policy;
+452 −0

File added.

Preview size limit exceeded, changes collapsed.

+19 −0
Original line number Diff line number Diff line
/**
 * Copyright (c) 2017, 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.hotspot2.pps;

parcelable UpdateParameter;
Loading