VegeFruits v7.1版本的 MD5 值为:2ff167dfba698c783e879938fe00b9ce
以下内容为反编译后的 VKApiUser.java 源代码,内容仅作参考
package com.vk.sdk.api.model;
import android.os.Parcel;
import android.os.Parcelable;
import android.text.TextUtils;
import org.json.JSONObject;
import org.nexage.sourcekit.vast.model.VASTModel;
public class VKApiUser extends VKApiOwner implements Parcelable {
public static final String FIELD_ONLINE = "online";
public String first_name;
private String full_name;
public String last_name;
public boolean online;
public boolean online_mobile;
public VKPhotoSizes photo;
public String photo_100;
public String photo_200;
public String photo_50;
public static final String FIELD_ONLINE_MOBILE = "online_mobile";
public static final String FIELD_PHOTO_50 = "photo_50";
public static final String FIELD_PHOTO_100 = "photo_100";
public static final String FIELD_PHOTO_200 = "photo_200";
public static final String FIELDS_DEFAULT = TextUtils.join(",", new String[]{"online", FIELD_ONLINE_MOBILE, FIELD_PHOTO_50, FIELD_PHOTO_100, FIELD_PHOTO_200});
public static Parcelable.Creator<VKApiUser> CREATOR = new Parcelable.Creator<VKApiUser>() {
@Override
public VKApiUser createFromParcel(Parcel source) {
return new VKApiUser(source);
}
@Override
public VKApiUser[] newArray(int size) {
return new VKApiUser[size];
}
};
@Override
public VKApiUser parse(JSONObject from) {
super.parse(from);
this.first_name = from.optString("first_name", this.first_name);
this.last_name = from.optString("last_name", this.last_name);
this.online = ParseUtils.parseBoolean(from, "online");
this.online_mobile = ParseUtils.parseBoolean(from, FIELD_ONLINE_MOBILE);
this.photo_50 = from.optString(FIELD_PHOTO_50, this.photo_50);
if (!TextUtils.isEmpty(this.photo_50)) {
this.photo.add((VKPhotoSizes) VKApiPhotoSize.create(this.photo_50, 50));
}
this.photo_100 = from.optString(FIELD_PHOTO_100, this.photo_100);
if (!TextUtils.isEmpty(this.photo_100)) {
this.photo.add((VKPhotoSizes) VKApiPhotoSize.create(this.photo_100, 100));
}
this.photo_200 = from.optString(FIELD_PHOTO_200, null);
if (!TextUtils.isEmpty(this.photo_200)) {
this.photo.add((VKPhotoSizes) VKApiPhotoSize.create(this.photo_200, VASTModel.ERROR_CODE_BAD_MODEL));
}
this.photo.sort();
return this;
}
public VKApiUser(Parcel in) {
super(in);
this.first_name = "DELETED";
this.last_name = "DELETED";
this.photo_50 = "http://vk.com/images/camera_c.gif";
this.photo_100 = "http://vk.com/images/camera_b.gif";
this.photo_200 = "http://vk.com/images/camera_a.gif";
this.photo = new VKPhotoSizes();
this.first_name = in.readString();
this.last_name = in.readString();
this.online = in.readByte() != 0;
this.online_mobile = in.readByte() != 0;
this.photo_50 = in.readString();
this.photo_100 = in.readString();
this.photo_200 = in.readString();
this.photo = (VKPhotoSizes) in.readParcelable(VKPhotoSizes.class.getClassLoader());
this.full_name = in.readString();
}
public VKApiUser() {
this.first_name = "DELETED";
this.last_name = "DELETED";
this.photo_50 = "http://vk.com/images/camera_c.gif";
this.photo_100 = "http://vk.com/images/camera_b.gif";
this.photo_200 = "http://vk.com/images/camera_a.gif";
this.photo = new VKPhotoSizes();
}
public String toString() {
if (this.full_name == null) {
this.full_name = String.valueOf(this.first_name) + ' ' + this.last_name;
}
return this.full_name;
}
@Override
public int describeContents() {
return 0;
}
@Override
public void writeToParcel(Parcel dest, int flags) {
super.writeToParcel(dest, flags);
dest.writeString(this.first_name);
dest.writeString(this.last_name);
dest.writeByte(this.online ? (byte) 1 : (byte) 0);
dest.writeByte(this.online_mobile ? (byte) 1 : (byte) 0);
dest.writeString(this.photo_50);
dest.writeString(this.photo_100);
dest.writeString(this.photo_200);
dest.writeParcelable(this.photo, flags);
dest.writeString(this.full_name);
}
}