Skip to content

Commit 5384fb7

Browse files
committed
App version bump + pivxj library updated (x5 DNS servers)
1 parent 7b50dfb commit 5384fb7

File tree

3 files changed

+10
-11
lines changed

3 files changed

+10
-11
lines changed

app/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ android {
1616
minSdkVersion 21
1717
targetSdkVersion 28
1818
versionCode 26
19-
versionName "3.1.1"
19+
versionName "3.1.2"
2020
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
2121
multiDexEnabled true
2222
externalNativeBuild {

app/src/main/java/pivx/org/pivxwallet/module/PivxContext.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,6 @@ public static final String getExternalWalletBackupFileName(String appName){
9090
/** Maximum size of backups. Files larger will be rejected. */
9191
public static final long BACKUP_MAX_CHARS = 10000000;
9292

93-
/** MAX TIME WAITED TO SAY THAT THE APP IS NOT SYNCHED ANYMORE.. in millis*/
93+
/** MAX TIME WAITED TO SAY THAT THE APP IS NOT SYNCED ANYMORE.. in millis*/
9494
public static final long OUT_OF_SYNC_TIME = 60000; // 1 minute
9595
}

app/src/main/java/pivx/org/pivxwallet/service/PivxWalletService.java

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,13 @@
1919
import android.support.v4.app.NotificationCompat;
2020
import android.support.v4.content.ContextCompat;
2121
import android.support.v4.content.LocalBroadcastManager;
22-
import android.widget.Toast;
23-
22+
import android.util.Log;
2423
import org.pivxj.core.Block;
2524
import org.pivxj.core.Coin;
2625
import org.pivxj.core.FilteredBlock;
2726
import org.pivxj.core.InsufficientMoneyException;
2827
import org.pivxj.core.Peer;
2928
import org.pivxj.core.Transaction;
30-
import org.pivxj.core.TransactionBroadcast;
3129
import org.pivxj.core.TransactionConfidence;
3230
import org.pivxj.core.listeners.AbstractPeerDataEventListener;
3331
import org.pivxj.core.listeners.PeerConnectedEventListener;
@@ -43,6 +41,7 @@
4341

4442
import java.io.File;
4543
import java.math.BigDecimal;
44+
import java.text.SimpleDateFormat;
4645
import java.util.ArrayList;
4746
import java.util.EnumSet;
4847
import java.util.List;
@@ -636,16 +635,15 @@ private void tryScheduleService() {
636635
boolean isSchedule = System.currentTimeMillis() < module.getConf().getScheduledBLockchainService();
637636

638637
if (!isSchedule){
639-
log.info("scheduling service");
640638
AlarmManager alarm = (AlarmManager)getSystemService(ALARM_SERVICE);
641-
long scheduleTime = System.currentTimeMillis() + 1000*60;//(1000 * 60 * 60); // One hour from now
642-
639+
long scheduleTime = System.currentTimeMillis() + 1000 * 60 * 15;//(1000 * 60 * 60); // One hour from now
640+
log.info("scheduling service for " + new SimpleDateFormat("MMM dd, yyyy hh:mm a").format(scheduleTime));
643641
Intent intent = new Intent(this, PivxWalletService.class);
644642
intent.setAction(ACTION_SCHEDULE_SERVICE);
645643
alarm.set(
646644
// This alarm will wake up the device when System.currentTimeMillis()
647645
// equals the second argument value
648-
alarm.RTC_WAKEUP,
646+
AlarmManager.RTC_WAKEUP,
649647
scheduleTime,
650648
// PendingIntent.getService creates an Intent that will start a service
651649
// when it is called. The first argument is the Context that will be used
@@ -665,14 +663,14 @@ private void tryScheduleService() {
665663
private void tryScheduleServiceNow() {
666664
log.info("scheduling service now");
667665
AlarmManager alarm = (AlarmManager)getSystemService(ALARM_SERVICE);
668-
long scheduleTime = System.currentTimeMillis() + 1000 * 60 * 2; // 2 minutes
666+
long scheduleTime = System.currentTimeMillis() + 1000 * 60 * 10; // 2 minutes
669667

670668
Intent intent = new Intent(this, PivxWalletService.class);
671669
intent.setAction(ACTION_SCHEDULE_SERVICE);
672670
alarm.set(
673671
// This alarm will wake up the device when System.currentTimeMillis()
674672
// equals the second argument value
675-
alarm.RTC_WAKEUP,
673+
AlarmManager.RTC_WAKEUP,
676674
scheduleTime,
677675
// PendingIntent.getService creates an Intent that will start a service
678676
// when it is called. The first argument is the Context that will be used
@@ -724,6 +722,7 @@ private void requestRateCoin(){
724722
*/
725723
private void check() {
726724
log.info("check");
725+
Log.i("PIVX_SERVICE", "Running check, is checking: " + isChecking.get());
727726
try {
728727
if (!isChecking.getAndSet(true)) {
729728

0 commit comments

Comments
 (0)