| 30 |
30 |
public void onFinishRotation(int axis, int row, int angle) { }
|
| 31 |
31 |
public void failedToDrag() { }
|
| 32 |
32 |
public void reportJSONError(String error, int ordinal) { }
|
|
33 |
public void reportBlockProblem(int type, int place, long pause, long resume, long time) { }
|
| 33 |
34 |
|
| 34 |
35 |
///////////////////////////////////////////////////////////////////////////////////////////////////
|
| 35 |
36 |
|
| ... | ... | |
| 55 |
56 |
}
|
| 56 |
57 |
}
|
| 57 |
58 |
}
|
| 58 |
|
|
| 59 |
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
| 60 |
|
|
| 61 |
|
private void reportUIProblem(int place, long pause, long resume, long time)
|
| 62 |
|
{
|
| 63 |
|
String error = "UI BLOCK "+place+" blocked for "+time;
|
| 64 |
|
|
| 65 |
|
if( BuildConfig.DEBUG )
|
| 66 |
|
{
|
| 67 |
|
android.util.Log.e("D", error);
|
| 68 |
|
}
|
| 69 |
|
else
|
| 70 |
|
{
|
| 71 |
|
Exception ex = new Exception(error);
|
| 72 |
|
FirebaseCrashlytics crashlytics = FirebaseCrashlytics.getInstance();
|
| 73 |
|
crashlytics.setCustomKey("pause" , pause );
|
| 74 |
|
crashlytics.setCustomKey("resume", resume );
|
| 75 |
|
crashlytics.recordException(ex);
|
| 76 |
|
}
|
| 77 |
|
}
|
| 78 |
|
|
| 79 |
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
| 80 |
|
|
| 81 |
|
private void reportTouchProblem(int place, long pause, long resume, long time)
|
| 82 |
|
{
|
| 83 |
|
String error = "TOUCH BLOCK "+place+" blocked for "+time;
|
| 84 |
|
|
| 85 |
|
if( BuildConfig.DEBUG )
|
| 86 |
|
{
|
| 87 |
|
android.util.Log.e("D", error);
|
| 88 |
|
}
|
| 89 |
|
else
|
| 90 |
|
{
|
| 91 |
|
Exception ex = new Exception(error);
|
| 92 |
|
FirebaseCrashlytics crashlytics = FirebaseCrashlytics.getInstance();
|
| 93 |
|
crashlytics.setCustomKey("pause" , pause );
|
| 94 |
|
crashlytics.setCustomKey("resume", resume);
|
| 95 |
|
crashlytics.recordException(ex);
|
| 96 |
|
}
|
| 97 |
|
}
|
| 98 |
|
|
| 99 |
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
| 100 |
|
|
| 101 |
|
private void reportThreadProblem(int place, long pause, long resume, long time)
|
| 102 |
|
{
|
| 103 |
|
String error = EffectMessageSender.reportState();
|
| 104 |
|
|
| 105 |
|
if( BuildConfig.DEBUG )
|
| 106 |
|
{
|
| 107 |
|
android.util.Log.e("D", error);
|
| 108 |
|
}
|
| 109 |
|
else
|
| 110 |
|
{
|
| 111 |
|
Exception ex = new Exception(error);
|
| 112 |
|
FirebaseCrashlytics crashlytics = FirebaseCrashlytics.getInstance();
|
| 113 |
|
crashlytics.setCustomKey("pause" , pause );
|
| 114 |
|
crashlytics.setCustomKey("resume", resume );
|
| 115 |
|
crashlytics.recordException(ex);
|
| 116 |
|
}
|
| 117 |
|
}
|
| 118 |
|
|
| 119 |
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
| 120 |
|
|
| 121 |
|
public void reportBlockProblem(int type, int place, long pause, long resume, long time)
|
| 122 |
|
{
|
| 123 |
|
switch(type)
|
| 124 |
|
{
|
| 125 |
|
case BlockController.TYPE_UI : reportUIProblem(place,pause,resume,time); break;
|
| 126 |
|
case BlockController.TYPE_TOUCH : reportTouchProblem(place,pause,resume,time); break;
|
| 127 |
|
case BlockController.TYPE_THREAD: reportThreadProblem(place,pause,resume,time); break;
|
| 128 |
|
}
|
| 129 |
|
}
|
| 130 |
59 |
}
|
IAP part 6: new 'Present' object effect.