Aqara Home v2.4.1版本的 MD5 值为:529779ac2bc0131db52a1fc3098d2b35
以下内容为反编译后的 FMRadioItemEntity.java 源代码,内容仅作参考
package com.lumiunited.aqara.device.devicepage.gateway.fm.bean;
import android.content.Context;
import android.os.Parcel;
import android.os.Parcelable;
import com.alibaba.fastjson.JSON;
import com.lumiunited.aqarahome.R;
import com.ximalaya.ting.android.opensdk.model.live.radio.Radio;
import java.util.List;
public class FMRadioItemEntity implements Parcelable {
public static final Parcelable.Creator<FMRadioItemEntity> CREATOR = new a();
public static final String TEST_JSONARRAY = "[{\"imgUrl\":\"http://fdfs.xmcdn.com/group27/M07/BA/41/wKgJW1jZxteB1gO6AAG0nCt58-U616_mobile_large.png\",\"name\":\"清晨音乐台\",\"type\":0,\"channelId\":\"1011\",\"url\":\"http://live.xmcdn.com/live/1011/64.m3u8\"},{\"imgUrl\":\"http://fdfs.xmcdn.com/group28/M0A/30/28/wKgJSFkxRX-ALd8CAABn8GON2wI634_mobile_large.jpg\",\"name\":\"中国之声\",\"type\":0,\"channelId\":\"1065\",\"url\":\"http://live.xmcdn.com/live/1065/64.m3u8\"},{\"imgUrl\":\"http://fdfs.xmcdn.com/group28/M08/31/CD/wKgJXFkxSMqjuk3HAAA_8PmYlK0874_mobile_large.jpg\",\"name\":\"FM87.5经典音乐调频\",\"type\":0,\"channelId\":\"1739\",\"url\":\"http://live.xmcdn.com/live/1853/64.m3u8\"},{\"imgUrl\":\"http://fdfs.xmcdn.com/group29/M09/2D/45/wKgJWVkxQpDAi2FtAABDP9lJKDI506_mobile_large.jpg\",\"name\":\"吉林新闻综合广播\",\"type\":0,\"channelId\":\"429\",\"url\":\"http://live.xmcdn.com/live/429/64.m3u8\"}]";
public String channelId;
public int fakeRes;
public String imgUrl;
public volatile boolean isCollected;
public boolean isFake;
public volatile boolean isPlaying;
public String name;
public String url;
public static class a implements Parcelable.Creator<FMRadioItemEntity> {
@Override
public FMRadioItemEntity createFromParcel(Parcel parcel) {
return new FMRadioItemEntity(parcel);
}
@Override
public FMRadioItemEntity[] newArray(int i2) {
return new FMRadioItemEntity[i2];
}
}
public FMRadioItemEntity() {
this.isPlaying = false;
this.isCollected = false;
this.isFake = false;
this.fakeRes = 0;
}
public static FMRadioItemEntity getFake(Context context) {
FMRadioItemEntity fMRadioItemEntity = new FMRadioItemEntity();
fMRadioItemEntity.isFake = true;
fMRadioItemEntity.fakeRes = R.mipmap.fm_add;
if (context != null) {
fMRadioItemEntity.name = context.getString(R.string.gateway_fm_add);
}
return fMRadioItemEntity;
}
public static List<FMRadioItemEntity> getTest() {
return JSON.parseArray(TEST_JSONARRAY, FMRadioItemEntity.class);
}
@Override
public int describeContents() {
return 0;
}
public String getChannelId() {
return this.channelId;
}
public int getFakeRes() {
return this.fakeRes;
}
public String getImgUrl() {
return this.imgUrl;
}
public String getName() {
return this.name;
}
public String getUrl() {
return this.url;
}
public boolean isCollected() {
return this.isCollected;
}
public boolean isFake() {
return this.isFake;
}
public boolean isPlaying() {
return this.isPlaying;
}
public void setChannelId(String str) {
this.channelId = str;
}
public void setCollected(boolean z2) {
this.isCollected = z2;
}
public void setFake(boolean z2) {
this.isFake = z2;
}
public void setFakeRes(int i2) {
this.fakeRes = i2;
}
public void setImgUrl(String str) {
this.imgUrl = str;
}
public void setName(String str) {
this.name = str;
}
public void setPlaying(boolean z2) {
this.isPlaying = z2;
}
public void setUrl(String str) {
this.url = str;
}
@Override
public void writeToParcel(Parcel parcel, int i2) {
parcel.writeString(this.channelId);
parcel.writeString(this.url);
parcel.writeString(this.name);
parcel.writeString(this.imgUrl);
parcel.writeBooleanArray(new boolean[]{this.isPlaying, this.isCollected, this.isFake});
parcel.writeInt(this.fakeRes);
}
public FMRadioItemEntity(Radio radio) {
this.isPlaying = false;
this.isCollected = false;
this.isFake = false;
this.fakeRes = 0;
if (radio.getDataId() != 0) {
this.channelId = radio.getDataId() + "";
} else {
String[] split = radio.getRate64AacUrl().split("/");
this.channelId = split[split.length - 2];
}
this.url = radio.getRate64AacUrl();
this.name = radio.getRadioName();
this.imgUrl = radio.getCoverUrlLarge();
}
public FMRadioItemEntity(Parcel parcel) {
this.isPlaying = false;
this.isCollected = false;
this.isFake = false;
this.fakeRes = 0;
this.channelId = parcel.readString();
this.url = parcel.readString();
this.name = parcel.readString();
this.imgUrl = parcel.readString();
boolean[] zArr = new boolean[3];
parcel.readBooleanArray(zArr);
this.isPlaying = zArr[0];
this.isCollected = zArr[1];
this.isFake = zArr[2];
this.fakeRes = parcel.readInt();
}
}