Warning, /network/kdeconnect-android/src/org/kde/kdeconnect/UserInterface/About/AboutPerson.kt is written in an unsupported language. File is not indexed.

0001 /*
0002  * SPDX-FileCopyrightText: 2021 Maxim Leshchenko <cnmaks90@gmail.com>
0003  *
0004  * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
0005  */
0006 
0007 package org.kde.kdeconnect.UserInterface.About
0008 
0009 import android.os.Parcel
0010 import android.os.Parcelable
0011 
0012 class AboutPerson @JvmOverloads constructor(val name: String, val task: Int? = null, val emailAddress: String? = null, val webAddress: String? = null) : Parcelable {
0013     constructor(parcel: Parcel) : this(parcel.readString().toString(), if (parcel.readByte() == 0x01.toByte()) parcel.readInt() else null, parcel.readString(), parcel.readString())
0014 
0015     override fun writeToParcel(parcel: Parcel, flags: Int) {
0016         parcel.writeString(name)
0017 
0018         if (task != null) {
0019             parcel.writeByte(0x01)
0020             parcel.writeInt(task)
0021         } else {
0022             parcel.writeByte(0x00)
0023         }
0024 
0025         parcel.writeString(emailAddress)
0026         parcel.writeString(webAddress)
0027     }
0028 
0029     override fun describeContents(): Int = 0
0030 
0031     companion object CREATOR : Parcelable.Creator<AboutPerson> {
0032         override fun createFromParcel(parcel: Parcel): AboutPerson = AboutPerson(parcel)
0033         override fun newArray(size: Int): Array<AboutPerson?> = arrayOfNulls(size)
0034     }
0035 }