Commit f57164fc5668f6ebf63fdca62461260979c521fa
1 parent
49bd44b3
Alerte expiration ne pop plus quand on se déco
Showing
1 changed file
with
8 additions
and
6 deletions
Show diff stats
PremiereActivite/app/src/main/java/com/example/app_10p5/MainActivite.java
@@ -41,7 +41,7 @@ public class MainActivite extends Activity implements ASyncResponse, main_tab_fr | @@ -41,7 +41,7 @@ public class MainActivite extends Activity implements ASyncResponse, main_tab_fr | ||
41 | public static final int STATE_ANNULER= 6; | 41 | public static final int STATE_ANNULER= 6; |
42 | public static final int STATE_REFAIRE = 7; | 42 | public static final int STATE_REFAIRE = 7; |
43 | 43 | ||
44 | - public static final long EXPIRATION = 1000*10*1; | 44 | + public static final long EXPIRATION = 1000*60*10; |
45 | 45 | ||
46 | private int mState; | 46 | private int mState; |
47 | private String mToken; | 47 | private String mToken; |
@@ -72,11 +72,13 @@ public class MainActivite extends Activity implements ASyncResponse, main_tab_fr | @@ -72,11 +72,13 @@ public class MainActivite extends Activity implements ASyncResponse, main_tab_fr | ||
72 | mTimerRunnable = new Runnable() { | 72 | mTimerRunnable = new Runnable() { |
73 | @Override | 73 | @Override |
74 | public void run() { | 74 | public void run() { |
75 | - if(System.currentTimeMillis() - mTimeToken >= EXPIRATION){ | ||
76 | - afficherPopup(); | ||
77 | - } | ||
78 | - else{ | ||
79 | - mTimerHandler.postDelayed(this, 5000); | 75 | + if(TextUtils.getTrimmedLength(mToken) == 30){ |
76 | + if(System.currentTimeMillis() - mTimeToken >= EXPIRATION){ | ||
77 | + afficherPopup(); | ||
78 | + } | ||
79 | + else{ | ||
80 | + mTimerHandler.postDelayed(this, 5000); | ||
81 | + } | ||
80 | } | 82 | } |
81 | } | 83 | } |
82 | }; | 84 | }; |