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

Commit 6a5c9560 authored by Robert Greenwalt's avatar Robert Greenwalt Committed by Android (Google) Code Review
Browse files

Merge "Add support for UNSOL PCO Data." into nyc-mr1-dev

parents d49a86ce 37409c57
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -695,6 +695,7 @@ aidl_files := \
	frameworks/base/core/java/android/service/quicksettings/Tile.aidl \
	frameworks/native/aidl/binder/android/os/PersistableBundle.aidl \
	system/netd/server/binder/android/net/UidRange.aidl \
	frameworks/base/telephony/java/android/telephony/PcoData.aidl \

gen := $(TARGET_OUT_COMMON_INTERMEDIATES)/framework.aidl
$(gen): PRIVATE_SRC_FILES := $(aidl_files)
+21 −0
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.telephony;

parcelable PcoData;
+87 −0
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.telephony;

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

/**
 * Contains Carrier-specific (and opaque) Protocol configuration Option
 * Data.  In general this is only passed on to carrier-specific applications
 * for interpretation.
 *
 * @hide
 */
public class PcoData implements Parcelable {

    public final int cid;
    public final String bearerProto;
    public final int pcoId;
    public final byte[] contents;

    public PcoData(int cid, String bearerProto, int pcoId, byte[]contents) {
        this.cid = cid;
        this.bearerProto = bearerProto;
        this.pcoId = pcoId;
        this.contents = contents;
    }

    public PcoData(Parcel in) {
        cid = in.readInt();
        bearerProto = in.readString();
        pcoId = in.readInt();
        contents = in.createByteArray();
    }

    /**
     * {@link Parcelable#writeToParcel}
     */
    public void writeToParcel(Parcel out, int flags) {
        out.writeInt(cid);
        out.writeString(bearerProto);
        out.writeInt(pcoId);
        out.writeByteArray(contents);
    }

    /**
     * {@link Parcelable#describeContents}
     */
    public int describeContents() {
        return 0;
    }

    /**
     * {@link Parcelable.Creator}
     *
     * @hide
     */
    public static final Parcelable.Creator<PcoData> CREATOR = new Parcelable.Creator() {
        public PcoData createFromParcel(Parcel in) {
            return new PcoData(in);
        }

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

    @Override
    public String toString() {
        return "PcoData(" + cid + ", " + bearerProto + ", " + pcoId + ", contents[" +
                contents.length + "])";
    }
}
+1 −0
Original line number Diff line number Diff line
@@ -461,4 +461,5 @@ cat include/telephony/ril.h | \
    int RIL_UNSOL_ON_SS = 1043;
    int RIL_UNSOL_STK_CC_ALPHA_NOTIFY = 1044;
    int RIL_UNSOL_LCEDATA_RECV = 1045;
    int RIL_UNSOL_PCO_DATA = 1046;
}