rename App.suggestedVersionName to autoInstallVersionName #1063
# Conflicts: # app/src/test/java/org/fdroid/fdroid/updater/IndexV1UpdaterTest.java
This commit is contained in:
parent
cd635459ad
commit
531494e571
@ -177,10 +177,10 @@ public class App extends ValueObject implements Comparable<App>, Parcelable {
|
|||||||
/**
|
/**
|
||||||
* Unlike other public fields, this is only accessible via a getter, to
|
* Unlike other public fields, this is only accessible via a getter, to
|
||||||
* emphasise that setting it wont do anything. In order to change this,
|
* emphasise that setting it wont do anything. In order to change this,
|
||||||
* you need to change suggestedVersionCode to an apk which is in the
|
* you need to change {@link #autoInstallVersionCode} to an APK which is
|
||||||
* apk table.
|
* in the {@link Schema.ApkTable} table.
|
||||||
*/
|
*/
|
||||||
private String suggestedVersionName;
|
private String autoInstallVersionName;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The version that will be automatically installed if the user does not
|
* The version that will be automatically installed if the user does not
|
||||||
@ -304,7 +304,7 @@ public class App extends ValueObject implements Comparable<App>, Parcelable {
|
|||||||
liberapayID = cursor.getString(i);
|
liberapayID = cursor.getString(i);
|
||||||
break;
|
break;
|
||||||
case Cols.AutoInstallApk.VERSION_NAME:
|
case Cols.AutoInstallApk.VERSION_NAME:
|
||||||
suggestedVersionName = cursor.getString(i);
|
autoInstallVersionName = cursor.getString(i);
|
||||||
break;
|
break;
|
||||||
case Cols.PREFERRED_SIGNER:
|
case Cols.PREFERRED_SIGNER:
|
||||||
preferredSigner = cursor.getString(i);
|
preferredSigner = cursor.getString(i);
|
||||||
@ -1081,11 +1081,11 @@ public class App extends ValueObject implements Comparable<App>, Parcelable {
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see App#suggestedVersionName for why this uses a getter while other member variables are
|
* @see App#autoInstallVersionName for why this uses a getter while other member variables are
|
||||||
* publicly accessible.
|
* publicly accessible.
|
||||||
*/
|
*/
|
||||||
public String getSuggestedVersionName() {
|
public String getAutoInstallVersionName() {
|
||||||
return suggestedVersionName;
|
return autoInstallVersionName;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1188,7 +1188,7 @@ public class App extends ValueObject implements Comparable<App>, Parcelable {
|
|||||||
dest.writeString(this.preferredSigner);
|
dest.writeString(this.preferredSigner);
|
||||||
dest.writeString(this.upstreamVersionName);
|
dest.writeString(this.upstreamVersionName);
|
||||||
dest.writeInt(this.upstreamVersionCode);
|
dest.writeInt(this.upstreamVersionCode);
|
||||||
dest.writeString(this.suggestedVersionName);
|
dest.writeString(this.autoInstallVersionName);
|
||||||
dest.writeInt(this.autoInstallVersionCode);
|
dest.writeInt(this.autoInstallVersionCode);
|
||||||
dest.writeLong(this.added != null ? this.added.getTime() : -1);
|
dest.writeLong(this.added != null ? this.added.getTime() : -1);
|
||||||
dest.writeLong(this.lastUpdated != null ? this.lastUpdated.getTime() : -1);
|
dest.writeLong(this.lastUpdated != null ? this.lastUpdated.getTime() : -1);
|
||||||
@ -1239,7 +1239,7 @@ public class App extends ValueObject implements Comparable<App>, Parcelable {
|
|||||||
this.preferredSigner = in.readString();
|
this.preferredSigner = in.readString();
|
||||||
this.upstreamVersionName = in.readString();
|
this.upstreamVersionName = in.readString();
|
||||||
this.upstreamVersionCode = in.readInt();
|
this.upstreamVersionCode = in.readInt();
|
||||||
this.suggestedVersionName = in.readString();
|
this.autoInstallVersionName = in.readString();
|
||||||
this.autoInstallVersionCode = in.readInt();
|
this.autoInstallVersionCode = in.readInt();
|
||||||
long tmpAdded = in.readLong();
|
long tmpAdded = in.readLong();
|
||||||
this.added = tmpAdded == -1 ? null : new Date(tmpAdded);
|
this.added = tmpAdded == -1 ? null : new Date(tmpAdded);
|
||||||
|
@ -40,7 +40,7 @@ public class StandardAppListItemController extends AppListItemController {
|
|||||||
return activity.getString(R.string.antifeatures);
|
return activity.getString(R.string.antifeatures);
|
||||||
} else if (app.isInstalled(activity.getApplicationContext())) {
|
} else if (app.isInstalled(activity.getApplicationContext())) {
|
||||||
if (app.canAndWantToUpdate(activity)) {
|
if (app.canAndWantToUpdate(activity)) {
|
||||||
return activity.getString(R.string.app_version_x_available, app.getSuggestedVersionName());
|
return activity.getString(R.string.app_version_x_available, app.getAutoInstallVersionName());
|
||||||
} else {
|
} else {
|
||||||
return activity.getString(R.string.app_version_x_installed, app.installedVersionName);
|
return activity.getString(R.string.app_version_x_installed, app.installedVersionName);
|
||||||
}
|
}
|
||||||
|
@ -54,7 +54,7 @@ public class InstalledAppListItemController extends AppListItemController {
|
|||||||
} else if (prefs.ignoreThisUpdate > 0 && prefs.ignoreThisUpdate == app.autoInstallVersionCode) {
|
} else if (prefs.ignoreThisUpdate > 0 && prefs.ignoreThisUpdate == app.autoInstallVersionCode) {
|
||||||
return activity.getString(
|
return activity.getString(
|
||||||
R.string.installed_app__updates_ignored_for_suggested_version,
|
R.string.installed_app__updates_ignored_for_suggested_version,
|
||||||
app.getSuggestedVersionName());
|
app.getAutoInstallVersionName());
|
||||||
}
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
|
@ -304,6 +304,7 @@ public class IndexV1UpdaterTest extends FDroidProviderTest {
|
|||||||
"authorEmail",
|
"authorEmail",
|
||||||
"authorName",
|
"authorName",
|
||||||
"autoInstallVersionCode",
|
"autoInstallVersionCode",
|
||||||
|
"autoInstallVersionName",
|
||||||
"bitcoin",
|
"bitcoin",
|
||||||
"categories",
|
"categories",
|
||||||
"changelog",
|
"changelog",
|
||||||
@ -333,7 +334,6 @@ public class IndexV1UpdaterTest extends FDroidProviderTest {
|
|||||||
"translation",
|
"translation",
|
||||||
"tvBanner",
|
"tvBanner",
|
||||||
"tvScreenshots",
|
"tvScreenshots",
|
||||||
"upstreamVersionCode",
|
|
||||||
"video",
|
"video",
|
||||||
"wearScreenshots",
|
"wearScreenshots",
|
||||||
"webSite",
|
"webSite",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user