Skip to content

Commit 0f44a74

Browse files
committed
- add force update interface
1 parent e4ff0ce commit 0f44a74

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

library/src/main/java/com/android/sebiya/update/AppUpdateInfo.java

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,16 @@
77
import android.util.Log;
88
import com.android.sebiya.update.AppVersionChecker.DefaultImpl;
99

10-
public final class AppUpdateInfo {
10+
public class AppUpdateInfo {
1111

1212
private static final String LOG_TAG = "AppUpdateInfo";
1313

1414
private Builder mBuilder;
1515

16+
public AppUpdateInfo() {
17+
18+
}
19+
1620
private AppUpdateInfo(Builder builder) {
1721
mBuilder = builder;
1822
}
@@ -62,6 +66,9 @@ public static class Builder {
6266
private final Context context;
6367

6468

69+
/**
70+
* @param context <code>null</code> possibly null if you call {@link #withCurrentVersion(long, String)}
71+
*/
6572
public Builder(@Nullable Context context) {
6673
this.context = context;
6774
}
@@ -71,6 +78,9 @@ public Builder withVersionChecker(AppVersionChecker checker) {
7178
return this;
7279
}
7380

81+
/**
82+
* if you don't set current version we will version code and name from PackageManager.
83+
*/
7484
public Builder withCurrentVersion(long code, String name) {
7585
currentVersionCode = code;
7686
currentVersionName = name;

0 commit comments

Comments
 (0)