[app] Update proguard rules (#995)
* [app] Update proguard rules * [app] Remove Parcelable and Serializable for gson modules
This commit is contained in:
parent
fe1e6b3651
commit
0e20e5cd7e
|
|
@ -17,8 +17,8 @@
|
|||
void onWindowLayoutChanged(...);
|
||||
}
|
||||
|
||||
-keepclasseswithmembers class org.lsposed.manager.repo.model.* {
|
||||
private java.util.List *;
|
||||
-keepclasseswithmembers,allowobfuscation class * {
|
||||
@com.google.gson.annotations.SerializedName <fields>;
|
||||
}
|
||||
|
||||
-repackageclasses
|
||||
|
|
|
|||
|
|
@ -20,15 +20,10 @@
|
|||
|
||||
package org.lsposed.manager.repo.model;
|
||||
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
|
||||
import com.google.gson.annotations.Expose;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
public class Collaborator implements Serializable, Parcelable {
|
||||
public class Collaborator {
|
||||
|
||||
@SerializedName("login")
|
||||
@Expose
|
||||
|
|
@ -36,26 +31,6 @@ public class Collaborator implements Serializable, Parcelable {
|
|||
@SerializedName("name")
|
||||
@Expose
|
||||
private String name;
|
||||
public final static Creator<Collaborator> CREATOR = new Creator<Collaborator>() {
|
||||
|
||||
public Collaborator createFromParcel(Parcel in) {
|
||||
return new Collaborator(in);
|
||||
}
|
||||
|
||||
public Collaborator[] newArray(int size) {
|
||||
return (new Collaborator[size]);
|
||||
}
|
||||
|
||||
};
|
||||
private final static long serialVersionUID = -7125602393430154154L;
|
||||
|
||||
protected Collaborator(Parcel in) {
|
||||
this.login = ((String) in.readValue((String.class.getClassLoader())));
|
||||
this.name = ((String) in.readValue((String.class.getClassLoader())));
|
||||
}
|
||||
|
||||
public Collaborator() {
|
||||
}
|
||||
|
||||
public String getLogin() {
|
||||
return login;
|
||||
|
|
@ -72,14 +47,4 @@ public class Collaborator implements Serializable, Parcelable {
|
|||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public void writeToParcel(Parcel dest, int flags) {
|
||||
dest.writeValue(login);
|
||||
dest.writeValue(name);
|
||||
}
|
||||
|
||||
public int describeContents() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,17 +20,13 @@
|
|||
|
||||
package org.lsposed.manager.repo.model;
|
||||
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
|
||||
import com.google.gson.annotations.Expose;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class OnlineModule implements Serializable, Parcelable {
|
||||
public class OnlineModule {
|
||||
|
||||
@SerializedName("name")
|
||||
@Expose
|
||||
|
|
@ -84,41 +80,6 @@ public class OnlineModule implements Serializable, Parcelable {
|
|||
@Expose
|
||||
private Integer stargazerCount;
|
||||
public boolean releasesLoaded = false;
|
||||
public final static Creator<OnlineModule> CREATOR = new Creator<OnlineModule>() {
|
||||
|
||||
public OnlineModule createFromParcel(Parcel in) {
|
||||
return new OnlineModule(in);
|
||||
}
|
||||
|
||||
public OnlineModule[] newArray(int size) {
|
||||
return (new OnlineModule[size]);
|
||||
}
|
||||
|
||||
};
|
||||
private final static long serialVersionUID = 3372849627722130087L;
|
||||
|
||||
protected OnlineModule(Parcel in) {
|
||||
this.name = ((String) in.readValue((String.class.getClassLoader())));
|
||||
this.description = ((String) in.readValue((String.class.getClassLoader())));
|
||||
this.url = ((String) in.readValue((String.class.getClassLoader())));
|
||||
this.homepageUrl = ((String) in.readValue((String.class.getClassLoader())));
|
||||
in.readList(this.collaborators, (Collaborator.class.getClassLoader()));
|
||||
in.readList(this.releases, (Release.class.getClassLoader()));
|
||||
this.readme = ((String) in.readValue((String.class.getClassLoader())));
|
||||
this.summary = ((String) in.readValue((String.class.getClassLoader())));
|
||||
in.readList(this.scope, (String.class.getClassLoader()));
|
||||
this.sourceUrl = ((String) in.readValue((String.class.getClassLoader())));
|
||||
this.hide = ((Boolean) in.readValue((Boolean.class.getClassLoader())));
|
||||
in.readList(this.additionalAuthors, (Object.class.getClassLoader()));
|
||||
this.updatedAt = ((String) in.readValue((String.class.getClassLoader())));
|
||||
this.createdAt = ((String) in.readValue((String.class.getClassLoader())));
|
||||
this.stargazerCount = ((Integer) in.readValue((Integer.class.getClassLoader())));
|
||||
this.readmeHTML = ((String) in.readValue((String.class.getClassLoader())));
|
||||
this.latestRelease = ((String) in.readValue((String.class.getClassLoader())));
|
||||
}
|
||||
|
||||
public OnlineModule() {
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
|
|
@ -249,30 +210,6 @@ public class OnlineModule implements Serializable, Parcelable {
|
|||
this.stargazerCount = stargazerCount;
|
||||
}
|
||||
|
||||
public void writeToParcel(Parcel dest, int flags) {
|
||||
dest.writeValue(name);
|
||||
dest.writeValue(description);
|
||||
dest.writeValue(url);
|
||||
dest.writeValue(homepageUrl);
|
||||
dest.writeList(collaborators);
|
||||
dest.writeList(releases);
|
||||
dest.writeValue(readme);
|
||||
dest.writeValue(summary);
|
||||
dest.writeList(scope);
|
||||
dest.writeValue(sourceUrl);
|
||||
dest.writeValue(hide);
|
||||
dest.writeList(additionalAuthors);
|
||||
dest.writeValue(updatedAt);
|
||||
dest.writeValue(createdAt);
|
||||
dest.writeValue(stargazerCount);
|
||||
dest.writeValue(readmeHTML);
|
||||
dest.writeValue(latestRelease);
|
||||
}
|
||||
|
||||
public int describeContents() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
public String getLatestRelease() {
|
||||
return latestRelease;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,17 +20,13 @@
|
|||
|
||||
package org.lsposed.manager.repo.model;
|
||||
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
|
||||
import com.google.gson.annotations.Expose;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class Release implements Serializable, Parcelable {
|
||||
public class Release {
|
||||
|
||||
@SerializedName("name")
|
||||
@Expose
|
||||
|
|
@ -62,34 +58,6 @@ public class Release implements Serializable, Parcelable {
|
|||
@SerializedName("releaseAssets")
|
||||
@Expose
|
||||
private List<ReleaseAsset> releaseAssets = new ArrayList<>();
|
||||
public final static Creator<Release> CREATOR = new Creator<Release>() {
|
||||
|
||||
public Release createFromParcel(Parcel in) {
|
||||
return new Release(in);
|
||||
}
|
||||
|
||||
public Release[] newArray(int size) {
|
||||
return (new Release[size]);
|
||||
}
|
||||
|
||||
};
|
||||
private final static long serialVersionUID = 1047772731795034659L;
|
||||
|
||||
protected Release(Parcel in) {
|
||||
this.name = ((String) in.readValue((String.class.getClassLoader())));
|
||||
this.url = ((String) in.readValue((String.class.getClassLoader())));
|
||||
this.description = ((String) in.readValue((String.class.getClassLoader())));
|
||||
this.descriptionHTML = ((String) in.readValue((String.class.getClassLoader())));
|
||||
this.createdAt = ((String) in.readValue((String.class.getClassLoader())));
|
||||
this.publishedAt = ((String) in.readValue((String.class.getClassLoader())));
|
||||
this.updatedAt = ((String) in.readValue((String.class.getClassLoader())));
|
||||
this.tagName = ((String) in.readValue((String.class.getClassLoader())));
|
||||
this.isPrerelease = ((Boolean) in.readValue((Boolean.class.getClassLoader())));
|
||||
in.readList(this.releaseAssets, (ReleaseAsset.class.getClassLoader()));
|
||||
}
|
||||
|
||||
public Release() {
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
|
|
@ -170,22 +138,4 @@ public class Release implements Serializable, Parcelable {
|
|||
public void setReleaseAssets(List<ReleaseAsset> releaseAssets) {
|
||||
this.releaseAssets = releaseAssets;
|
||||
}
|
||||
|
||||
public void writeToParcel(Parcel dest, int flags) {
|
||||
dest.writeValue(name);
|
||||
dest.writeValue(url);
|
||||
dest.writeValue(description);
|
||||
dest.writeValue(descriptionHTML);
|
||||
dest.writeValue(createdAt);
|
||||
dest.writeValue(publishedAt);
|
||||
dest.writeValue(updatedAt);
|
||||
dest.writeValue(tagName);
|
||||
dest.writeValue(isPrerelease);
|
||||
dest.writeList(releaseAssets);
|
||||
}
|
||||
|
||||
public int describeContents() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,15 +20,10 @@
|
|||
|
||||
package org.lsposed.manager.repo.model;
|
||||
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
|
||||
import com.google.gson.annotations.Expose;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
public class ReleaseAsset implements Serializable, Parcelable {
|
||||
public class ReleaseAsset {
|
||||
|
||||
@SerializedName("name")
|
||||
@Expose
|
||||
|
|
@ -39,27 +34,6 @@ public class ReleaseAsset implements Serializable, Parcelable {
|
|||
@SerializedName("downloadUrl")
|
||||
@Expose
|
||||
private String downloadUrl;
|
||||
public final static Creator<ReleaseAsset> CREATOR = new Creator<ReleaseAsset>() {
|
||||
|
||||
public ReleaseAsset createFromParcel(Parcel in) {
|
||||
return new ReleaseAsset(in);
|
||||
}
|
||||
|
||||
public ReleaseAsset[] newArray(int size) {
|
||||
return (new ReleaseAsset[size]);
|
||||
}
|
||||
|
||||
};
|
||||
private final static long serialVersionUID = -4273789818349239422L;
|
||||
|
||||
protected ReleaseAsset(Parcel in) {
|
||||
this.name = ((String) in.readValue((String.class.getClassLoader())));
|
||||
this.contentType = ((String) in.readValue((String.class.getClassLoader())));
|
||||
this.downloadUrl = ((String) in.readValue((String.class.getClassLoader())));
|
||||
}
|
||||
|
||||
public ReleaseAsset() {
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
|
|
@ -84,15 +58,4 @@ public class ReleaseAsset implements Serializable, Parcelable {
|
|||
public void setDownloadUrl(String downloadUrl) {
|
||||
this.downloadUrl = downloadUrl;
|
||||
}
|
||||
|
||||
public void writeToParcel(Parcel dest, int flags) {
|
||||
dest.writeValue(name);
|
||||
dest.writeValue(contentType);
|
||||
dest.writeValue(downloadUrl);
|
||||
}
|
||||
|
||||
public int describeContents() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue