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

Commit 152978d0 authored by David Su's avatar David Su
Browse files

Wifi: remove dead code

Remove unused Parcelables from frameworks/base

Bug: 134712974
Test: compiles
Change-Id: I3e5bb51780750d22a0e49922c32fae21addc53cc
parent f1d607dd
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -29,7 +29,6 @@ import android.net.wifi.INetworkRequestMatchCallback;
import android.net.wifi.ISoftApCallback;
import android.net.wifi.ITrafficStateCallback;
import android.net.wifi.IOnWifiUsabilityStatsListener;
import android.net.wifi.PasspointManagementObjectDefinition;
import android.net.wifi.ScanResult;
import android.net.wifi.WifiActivityEnergyInfo;
import android.net.wifi.WifiConfiguration;
+0 −19
Original line number Diff line number Diff line
/**
 * Copyright (c) 2008, 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;

parcelable PasspointManagementObjectDefinition;
+0 −81
Original line number Diff line number Diff line
/*
 * Copyright (C) 2016 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;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * This object describes a partial tree structure in the Hotspot 2.0 release 2 management object.
 * The object is used during subscription remediation to modify parts of an existing PPS MO
 * tree (Hotspot 2.0 specification section 9.1).
 * @hide
 */
public class PasspointManagementObjectDefinition implements Parcelable {
    private final String mBaseUri;
    private final String mUrn;
    private final String mMoTree;

    public PasspointManagementObjectDefinition(String baseUri, String urn, String moTree) {
        mBaseUri = baseUri;
        mUrn = urn;
        mMoTree = moTree;
    }

    public String getBaseUri() {
        return mBaseUri;
    }

    public String getUrn() {
        return mUrn;
    }

    public String getMoTree() {
        return mMoTree;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(mBaseUri);
        dest.writeString(mUrn);
        dest.writeString(mMoTree);
    }

    /**
     * Implement the Parcelable interface {@hide}
     */
    public static final @android.annotation.NonNull Creator<PasspointManagementObjectDefinition> CREATOR =
            new Creator<PasspointManagementObjectDefinition>() {
                public PasspointManagementObjectDefinition createFromParcel(Parcel in) {
                    return new PasspointManagementObjectDefinition(
                            in.readString(),    /* base URI */
                            in.readString(),    /* URN */
                            in.readString()     /* Tree XML */
                    );
                }

                public PasspointManagementObjectDefinition[] newArray(int size) {
                    return new PasspointManagementObjectDefinition[size];
                }
            };
}
+0 −19
Original line number Diff line number Diff line
/**
 * Copyright (c) 2010, 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;

parcelable WpsResult;
+0 −90
Original line number Diff line number Diff line
/*
 * Copyright (C) 2010 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;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * A class representing the result of a WPS request
 * @hide
 */
public class WpsResult implements Parcelable {

    public enum Status {
        SUCCESS,
        FAILURE,
        IN_PROGRESS,
    }

    public Status status;

    public String pin;

    public WpsResult() {
        status = Status.FAILURE;
        pin = null;
    }

    public WpsResult(Status s) {
        status = s;
        pin = null;
    }

    public String toString() {
        StringBuffer sbuf = new StringBuffer();
        sbuf.append(" status: ").append(status.toString());
        sbuf.append('\n');
        sbuf.append(" pin: ").append(pin);
        sbuf.append("\n");
        return sbuf.toString();
    }

    /** Implement the Parcelable interface {@hide} */
    public int describeContents() {
        return 0;
    }

    /** copy constructor {@hide} */
    public WpsResult(WpsResult source) {
        if (source != null) {
            status = source.status;
            pin = source.pin;
        }
    }

    /** Implement the Parcelable interface {@hide} */
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(status.name());
        dest.writeString(pin);
    }

    /** Implement the Parcelable interface {@hide} */
    public static final @android.annotation.NonNull Creator<WpsResult> CREATOR =
        new Creator<WpsResult>() {
            public WpsResult createFromParcel(Parcel in) {
                WpsResult result = new WpsResult();
                result.status = Status.valueOf(in.readString());
                result.pin = in.readString();
                return result;
            }

            public WpsResult[] newArray(int size) {
                return new WpsResult[size];
            }
        };
}
Loading