77 lines
1.9 KiB
Java
77 lines
1.9 KiB
Java
package com.ubt.jimu.controller.data.config;
|
|
|
|
import android.text.TextUtils;
|
|
import com.thoughtworks.xstream.annotations.XStreamAsAttribute;
|
|
import com.ubt.jimu.controller.data.widget.MoveBaseData;
|
|
import com.ubt.jimu.controller.util.IDGenerator;
|
|
import java.io.Serializable;
|
|
|
|
/* loaded from: classes.dex */
|
|
public abstract class WidgetConfig<D extends MoveBaseData> implements Serializable {
|
|
public static final int CUSTOM = 2;
|
|
public static final int MAX_ANGLE = 118;
|
|
public static final int MIN_ANGLE = -118;
|
|
public static final int OFFICIAL = 1;
|
|
|
|
@XStreamAsAttribute
|
|
private String configID;
|
|
|
|
@XStreamAsAttribute
|
|
private int configType = 2;
|
|
|
|
@XStreamAsAttribute
|
|
private long updateTime;
|
|
|
|
public WidgetConfig() {
|
|
init();
|
|
}
|
|
|
|
private void init() {
|
|
long currentTimeMillis = System.currentTimeMillis();
|
|
this.configID = IDGenerator.a(currentTimeMillis);
|
|
this.updateTime = currentTimeMillis;
|
|
}
|
|
|
|
public abstract D encapData();
|
|
|
|
public String getConfigID() {
|
|
return this.configID;
|
|
}
|
|
|
|
public int getConfigType() {
|
|
return this.configType;
|
|
}
|
|
|
|
public long getUpdateTime() {
|
|
return this.updateTime;
|
|
}
|
|
|
|
public void setConfigID(String str) {
|
|
this.configID = str;
|
|
}
|
|
|
|
public void setConfigType(int i) {
|
|
this.configType = i;
|
|
}
|
|
|
|
public void setUpdateTime(long j) {
|
|
this.updateTime = j;
|
|
}
|
|
|
|
public String toString() {
|
|
StringBuilder sb = new StringBuilder();
|
|
sb.append(" configID=" + this.configID);
|
|
sb.append(" configType=" + this.configType);
|
|
sb.append(" updateTime=" + this.updateTime);
|
|
return sb.toString();
|
|
}
|
|
|
|
public WidgetConfig(String str) {
|
|
if (TextUtils.isEmpty(str)) {
|
|
init();
|
|
} else {
|
|
this.configID = str;
|
|
}
|
|
}
|
|
}
|