Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
JasonQS committed Apr 15, 2018
1 parent 921a336 commit c9ba16d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ protected void onCreate(Bundle savedInstanceState) {
Intent intent = new Intent(LaunchActivity.this, MainActivity.class);
startActivity(intent);
LaunchActivity.this.finish();
}, 2000);
}, 1500);

}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ public void onItemSwipeMoving(Canvas canvas, RecyclerView.ViewHolder viewHolder,

private void checkUpdate() {
//wifi环境下检查更新
UpdateHelper helper = new UpdateHelper(this, Activity.class);
UpdateHelper helper = new UpdateHelper(this);
// if (helper.isWifi())
helper.checkUpdate();
}
Expand Down
4 changes: 1 addition & 3 deletions utils/src/main/java/com/qsboy/utils/UpdateHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,9 @@ public class UpdateHelper {
private String desc;
private String path;
private File apkFile;
boolean needUpdate = true;

// TODO: 02/04/2018
public UpdateHelper(Context context, Class<Activity> mainActivity) {
public UpdateHelper(Context context) {

this.context = context;
apkFile = new File(context.getExternalFilesDir("apk"), appName);
Expand Down Expand Up @@ -129,7 +128,6 @@ private boolean needUpdate() {
Log.d(TAG, "local version code : " + localVersion);
Log.d(TAG, "need update? " + b);

needUpdate = b;
return b;
}

Expand Down

0 comments on commit c9ba16d

Please sign in to comment.