version:1.0.1
fix: update:基本功能完成,修复闪退,更换壁纸未实现
This commit is contained in:
279
app/src/main/java/com/xwad/os/bean/jxw/AppInfo.java
Normal file
279
app/src/main/java/com/xwad/os/bean/jxw/AppInfo.java
Normal file
@@ -0,0 +1,279 @@
|
||||
package com.xwad.os.bean.jxw;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
|
||||
import androidx.fragment.app.Fragment;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public class AppInfo implements Parcelable, Comparable<AppInfo> {
|
||||
public String apkName;
|
||||
public Drawable appIcon;
|
||||
public String appName;
|
||||
public String appVersion;
|
||||
public String className;
|
||||
public String fileName;
|
||||
public int fileSize;
|
||||
public String forceUpdate;
|
||||
|
||||
public Long id;
|
||||
public int index;
|
||||
public Intent intent;
|
||||
public int isSystem;
|
||||
public String jumpType;
|
||||
public int localVer;
|
||||
public String localVer2;
|
||||
public String mStargss;
|
||||
public String packageName;
|
||||
public String updateContent;
|
||||
public String url;
|
||||
public int versionCode;
|
||||
public String versionName;
|
||||
|
||||
private AppInfo(Parcel in) {
|
||||
apkName = in.readString();
|
||||
appName = in.readString();
|
||||
appVersion = in.readString();
|
||||
className = in.readString();
|
||||
fileName = in.readString();
|
||||
fileSize = in.readInt();
|
||||
forceUpdate = in.readString();
|
||||
if (in.readByte() == 0) {
|
||||
id = null;
|
||||
} else {
|
||||
id = in.readLong();
|
||||
}
|
||||
index = in.readInt();
|
||||
intent = in.readParcelable(Intent.class.getClassLoader());
|
||||
isSystem = in.readInt();
|
||||
jumpType = in.readString();
|
||||
localVer = in.readInt();
|
||||
localVer2 = in.readString();
|
||||
mStargss = in.readString();
|
||||
packageName = in.readString();
|
||||
updateContent = in.readString();
|
||||
url = in.readString();
|
||||
versionCode = in.readInt();
|
||||
versionName = in.readString();
|
||||
}
|
||||
|
||||
public static final Creator<AppInfo> CREATOR = new Creator<AppInfo>() {
|
||||
@Override
|
||||
public AppInfo createFromParcel(Parcel in) {
|
||||
return new AppInfo(in);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AppInfo[] newArray(int size) {
|
||||
return new AppInfo[size];
|
||||
}
|
||||
};
|
||||
|
||||
@Override
|
||||
public int describeContents() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToParcel(Parcel parcel, int i) {
|
||||
parcel.writeString(apkName);
|
||||
parcel.writeString(appName);
|
||||
parcel.writeString(appVersion);
|
||||
parcel.writeString(className);
|
||||
parcel.writeString(fileName);
|
||||
parcel.writeInt(fileSize);
|
||||
parcel.writeString(forceUpdate);
|
||||
if (id == null) {
|
||||
parcel.writeByte((byte) 0);
|
||||
} else {
|
||||
parcel.writeByte((byte) 1);
|
||||
parcel.writeLong(id);
|
||||
}
|
||||
parcel.writeInt(index);
|
||||
parcel.writeParcelable(intent, i);
|
||||
parcel.writeInt(isSystem);
|
||||
parcel.writeString(jumpType);
|
||||
parcel.writeInt(localVer);
|
||||
parcel.writeString(localVer2);
|
||||
parcel.writeString(mStargss);
|
||||
parcel.writeString(packageName);
|
||||
parcel.writeString(updateContent);
|
||||
parcel.writeString(url);
|
||||
parcel.writeInt(versionCode);
|
||||
parcel.writeString(versionName);
|
||||
}
|
||||
|
||||
private AppInfo(Builder builder) {
|
||||
this.versionCode = 0;
|
||||
this.localVer = 0;
|
||||
this.appName = builder.appName;
|
||||
this.appIcon = builder.appIcon;
|
||||
this.intent = builder.intent;
|
||||
this.packageName = builder.packageName;
|
||||
this.mStargss = builder.mStargss;
|
||||
this.jumpType = builder.jumpType;
|
||||
this.isSystem = builder.isSystem;
|
||||
this.fileName = builder.fileName;
|
||||
}
|
||||
|
||||
public AppInfo() {
|
||||
this.versionCode = 0;
|
||||
this.localVer = 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int compareTo(AppInfo appInfo) {
|
||||
return Integer.compare(getIndex(), appInfo.getIndex());
|
||||
}
|
||||
|
||||
public int getIndex() {
|
||||
return this.index;
|
||||
}
|
||||
|
||||
public void setIndex(int i) {
|
||||
this.index = i;
|
||||
}
|
||||
|
||||
public int getIsSystem() {
|
||||
return this.isSystem;
|
||||
}
|
||||
|
||||
public void setIsSystem(int i) {
|
||||
this.isSystem = i;
|
||||
}
|
||||
|
||||
public String getJumpType() {
|
||||
return this.jumpType;
|
||||
}
|
||||
|
||||
public void setJumpType(String str) {
|
||||
this.jumpType = str;
|
||||
}
|
||||
|
||||
public String getmStargss() {
|
||||
return this.mStargss;
|
||||
}
|
||||
|
||||
public void setmStargss(String str) {
|
||||
this.mStargss = str;
|
||||
}
|
||||
|
||||
public String getAppLabel() {
|
||||
return this.appName;
|
||||
}
|
||||
|
||||
public void setAppLabel(String str) {
|
||||
this.appName = str;
|
||||
}
|
||||
|
||||
public Drawable getAppIcon() {
|
||||
return this.appIcon;
|
||||
}
|
||||
|
||||
public void setAppIcon(Drawable drawable) {
|
||||
this.appIcon = drawable;
|
||||
}
|
||||
|
||||
public Intent getIntent() {
|
||||
return this.intent;
|
||||
}
|
||||
|
||||
public void setIntent(Intent intent) {
|
||||
this.intent = intent;
|
||||
}
|
||||
|
||||
public String getPkgName() {
|
||||
return this.packageName;
|
||||
}
|
||||
|
||||
public void setPkgName(String str) {
|
||||
this.packageName = str;
|
||||
}
|
||||
|
||||
public String getFileName() {
|
||||
return this.fileName;
|
||||
}
|
||||
|
||||
public void setFileName(String str) {
|
||||
this.fileName = str;
|
||||
}
|
||||
|
||||
public String getAppVersion() {
|
||||
return this.appVersion;
|
||||
}
|
||||
|
||||
public void setAppVersion(String str) {
|
||||
this.appVersion = str;
|
||||
}
|
||||
|
||||
|
||||
public static class Builder {
|
||||
public Drawable appIcon;
|
||||
public String appName;
|
||||
public String fileName;
|
||||
public Intent intent;
|
||||
public int isSystem;
|
||||
public String jumpType;
|
||||
public String mStargss;
|
||||
public String packageName;
|
||||
|
||||
public Builder appJumpType(String str) {
|
||||
this.jumpType = str;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder appLabel(String str) {
|
||||
this.appName = str;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder appStargs(String str) {
|
||||
this.mStargss = str;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder appStargsAdd(String str, Fragment fragment) {
|
||||
this.mStargss = str;
|
||||
// MyApp.getInstance().mBottomBtnOnClickListener.setFragment(fragment);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder appIcon(Drawable drawable) {
|
||||
this.appIcon = drawable;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder intent(Intent intent) {
|
||||
this.intent = intent;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder pkgName(String str) {
|
||||
this.packageName = str;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder isSystem(int i) {
|
||||
this.isSystem = i;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder fileName(String str) {
|
||||
this.fileName = str;
|
||||
return this;
|
||||
}
|
||||
|
||||
public AppInfo build() {
|
||||
return new AppInfo(this);
|
||||
}
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public String toString() {
|
||||
return "AppInfo{appIcon=" + this.appIcon + ", mStargss='" + this.mStargss + "', jumpType='" + this.jumpType + "'}";
|
||||
}
|
||||
}
|
||||
110
app/src/main/java/com/xwad/os/bean/jxw/AppUseInfo.java
Normal file
110
app/src/main/java/com/xwad/os/bean/jxw/AppUseInfo.java
Normal file
@@ -0,0 +1,110 @@
|
||||
package com.xwad.os.bean.jxw;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
public class AppUseInfo implements Serializable {
|
||||
private Long createTime;
|
||||
private Integer devilDeviceId;
|
||||
private Integer enabled;
|
||||
private Object iconBase64;
|
||||
private String iconUrl;
|
||||
|
||||
private Integer id;
|
||||
private Integer limitTime;
|
||||
private String packageName;
|
||||
private String title;
|
||||
private Long updateTime;
|
||||
private String version;
|
||||
|
||||
public String toString() {
|
||||
return "AppUseInfo{id=" + this.id + ", devilDeviceId=" + this.devilDeviceId + ", packageName='" + this.packageName + "', version='" + this.version + "', title='" + this.title + "', iconUrl='" + this.iconUrl + "', createTime=" + this.createTime + ", updateTime=" + this.updateTime + ", iconBase64=" + this.iconBase64 + ", enabled=" + this.enabled + ", limitTime=" + this.limitTime + '}';
|
||||
}
|
||||
|
||||
public Integer getId() {
|
||||
return this.id;
|
||||
}
|
||||
|
||||
public void setId(Integer num) {
|
||||
this.id = num;
|
||||
}
|
||||
|
||||
public Integer getDevilDeviceId() {
|
||||
return this.devilDeviceId;
|
||||
}
|
||||
|
||||
public void setDevilDeviceId(Integer num) {
|
||||
this.devilDeviceId = num;
|
||||
}
|
||||
|
||||
public String getPackageName() {
|
||||
return this.packageName;
|
||||
}
|
||||
|
||||
public void setPackageName(String str) {
|
||||
this.packageName = str;
|
||||
}
|
||||
|
||||
public String getVersion() {
|
||||
return this.version;
|
||||
}
|
||||
|
||||
public void setVersion(String str) {
|
||||
this.version = str;
|
||||
}
|
||||
|
||||
public String getTitle() {
|
||||
return this.title;
|
||||
}
|
||||
|
||||
public void setTitle(String str) {
|
||||
this.title = str;
|
||||
}
|
||||
|
||||
public String getIconUrl() {
|
||||
return this.iconUrl;
|
||||
}
|
||||
|
||||
public void setIconUrl(String str) {
|
||||
this.iconUrl = str;
|
||||
}
|
||||
|
||||
public Long getCreateTime() {
|
||||
return this.createTime;
|
||||
}
|
||||
|
||||
public void setCreateTime(Long l) {
|
||||
this.createTime = l;
|
||||
}
|
||||
|
||||
public Long getUpdateTime() {
|
||||
return this.updateTime;
|
||||
}
|
||||
|
||||
public void setUpdateTime(Long l) {
|
||||
this.updateTime = l;
|
||||
}
|
||||
|
||||
public Object getIconBase64() {
|
||||
return this.iconBase64;
|
||||
}
|
||||
|
||||
public void setIconBase64(Object obj) {
|
||||
this.iconBase64 = obj;
|
||||
}
|
||||
|
||||
public Integer getEnabled() {
|
||||
return this.enabled;
|
||||
}
|
||||
|
||||
public void setEnabled(Integer num) {
|
||||
this.enabled = num;
|
||||
}
|
||||
|
||||
public Integer getLimitTime() {
|
||||
return this.limitTime;
|
||||
}
|
||||
|
||||
public void setLimitTime(Integer num) {
|
||||
this.limitTime = num;
|
||||
}
|
||||
}
|
||||
23
app/src/main/java/com/xwad/os/bean/jxw/GkAppUseInfo.java
Normal file
23
app/src/main/java/com/xwad/os/bean/jxw/GkAppUseInfo.java
Normal file
@@ -0,0 +1,23 @@
|
||||
package com.xwad.os.bean.jxw;
|
||||
|
||||
import android.content.Intent;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class GkAppUseInfo {
|
||||
private static GkAppUseInfo gkAppUseInfo;
|
||||
public List<AppUseInfo> datas;
|
||||
|
||||
public static GkAppUseInfo getGkAppUseInfo() {
|
||||
if (gkAppUseInfo == null) {
|
||||
gkAppUseInfo = new GkAppUseInfo();
|
||||
}
|
||||
return gkAppUseInfo;
|
||||
}
|
||||
|
||||
public void getAppUseInfo() {
|
||||
Intent intent = new Intent();
|
||||
intent.setAction("com.jxw.get_app");
|
||||
// MyApp.getInstance().sendBroadcast(intent);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user