private void doUpdate() { AppLockApplication appLockApplication = AppLockApplication.getInstance(); if (System.currentTimeMillis() - SharedPreferenceUtil.readUpdateTipTime() >= 1000 * 60 * 60 * 20 && appLockApplication.hasNewVersion()) { downLoadFileUrl = appLockApplication.getUpdateVersionUrl(); showUpdateDialog(appLockApplication.getUpdateVersionIntro()); SharedPreferenceUtil.editUpdateTipTime(System.currentTimeMillis()); } }
public void startFirstServices() { if (!SharedPreferenceUtil.readEnterFlag()) { LogUtil.e("colin", "testService_start"); startService( new Intent("com.cleanwiz.applock.service.LockService") .setPackage("com.cleanwiz.applock")); SharedPreferenceUtil.editEnterFlag(true); } }