Revision 1fa125c2
Added by Leszek Koltunski over 2 years ago
src/main/java/org/distorted/main/RubikObjectLibInterface.java | ||
---|---|---|
34 | 34 |
|
35 | 35 |
import org.distorted.library.message.EffectMessageSender; |
36 | 36 |
|
37 |
import org.distorted.network.RubikNetwork; |
|
37 | 38 |
import org.distorted.objectlib.BuildConfig; |
38 | 39 |
import org.distorted.objectlib.helpers.BlockController; |
39 | 40 |
import org.distorted.objectlib.helpers.ObjectLibInterface; |
... | ... | |
96 | 97 |
|
97 | 98 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
98 | 99 |
|
99 |
private void reportRecord(RubikActivity act, String debug, int scrambleNum) |
|
100 |
private void reportRecord(RubikActivity act, long startTime, long endTime, String debug, int scrambleNum)
|
|
100 | 101 |
{ |
101 | 102 |
RubikScreenPlay play= (RubikScreenPlay) ScreenList.PLAY.getScreenClass(); |
102 | 103 |
RubikScores scores = RubikScores.getInstance(); |
... | ... | |
116 | 117 |
} |
117 | 118 |
else |
118 | 119 |
{ |
120 |
long timeNow = System.currentTimeMillis(); |
|
121 |
long elapsed = timeNow - startTime; |
|
122 |
|
|
123 |
if( level>=9 && mNewRecord<300*level ) |
|
124 |
{ |
|
125 |
String suspicious ="start"+startTime+"end"+endTime+"elapsed"+elapsed+"obj"+objName+"level"+level+"record"+mNewRecord+"scrambles"+scrambleNum+debug; |
|
126 |
RubikNetwork network = RubikNetwork.getInstance(); |
|
127 |
network.suspicious(act,suspicious); |
|
128 |
} |
|
129 |
|
|
119 | 130 |
FirebaseAnalytics analytics = act.getAnalytics(); |
120 | 131 |
|
121 | 132 |
if( analytics!=null ) |
... | ... | |
183 | 194 |
|
184 | 195 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
185 | 196 |
|
186 |
public void onWinEffectFinished(String debug, int scrambleNum) |
|
197 |
public void onWinEffectFinished(long startTime, long endTime, String debug, int scrambleNum)
|
|
187 | 198 |
{ |
188 | 199 |
if( ScreenList.getCurrentScreen()== ScreenList.SOLV ) |
189 | 200 |
{ |
... | ... | |
191 | 202 |
Bundle bundle = new Bundle(); |
192 | 203 |
bundle.putLong("time", mNewRecord ); |
193 | 204 |
|
194 |
reportRecord(act,debug,scrambleNum); |
|
205 |
reportRecord(act,startTime,endTime,debug,scrambleNum);
|
|
195 | 206 |
requestReview(act); |
196 | 207 |
|
197 | 208 |
if( mIsNewRecord ) |
Also available in: Unified diff
Add debugging for the case when people submit suspicious records.