Project

General

Profile

« Previous | Next » 

Revision d887aa16

Added by Leszek Koltunski over 2 years ago

Remove dependancies on Firebase from objectlib.
Report such errors to the application via the Interface.

View differences:

src/main/java/org/distorted/objectlib/main/TwistyObject.java
24 24
import android.graphics.Canvas;
25 25
import android.graphics.Paint;
26 26

  
27
import com.google.firebase.crashlytics.FirebaseCrashlytics;
28

  
29 27
import org.distorted.library.effect.Effect;
30 28
import org.distorted.library.effect.MatrixEffectMove;
31 29
import org.distorted.library.effect.MatrixEffectQuaternion;
......
46 44
import org.distorted.library.type.Static3D;
47 45
import org.distorted.library.type.Static4D;
48 46

  
49
import org.distorted.objectlib.BuildConfig;
50 47
import org.distorted.objectlib.helpers.FactoryCubit;
51 48
import org.distorted.objectlib.helpers.FactorySticker;
49
import org.distorted.objectlib.helpers.ObjectLibInterface;
52 50
import org.distorted.objectlib.helpers.ObjectShape;
53 51
import org.distorted.objectlib.helpers.ObjectSticker;
54 52
import org.distorted.objectlib.helpers.ScrambleState;
......
135 133
  private boolean[][] mLayerRotatable;
136 134
  private int[][][] mEnabled;
137 135
  private DistortedNode mNode;
136
  private ObjectLibInterface mInterface;
138 137

  
139 138
  //////////////////// SOLVED1 ////////////////////////
140 139

  
......
857 856
      }
858 857
    else
859 858
      {
860
      FirebaseCrashlytics crashlytics = FirebaseCrashlytics.getInstance();
861
      crashlytics.log("points in RotationAngle: "+pointNum);
859
      mInterface.reportProblem("points in RotationAngle: "+pointNum);
862 860
      return 0;
863 861
      }
864 862
    }
......
876 874
      }
877 875

  
878 876
    String name = intGetObjectType(mNumLayers).name();
877
    mInterface.reportProblem("obj: "+name+" quats: "+quats.toString());
878
    }
879 879

  
880
    if( BuildConfig.DEBUG )
881
      {
882
      android.util.Log.e("quats" , quats.toString());
883
      android.util.Log.e("object", name);
884
      }
885
    else
886
      {
887
      Exception ex = new Exception(message);
888
      FirebaseCrashlytics crashlytics = FirebaseCrashlytics.getInstance();
889
      crashlytics.setCustomKey("quats" , quats.toString());
890
      crashlytics.setCustomKey("object", name);
891
      crashlytics.recordException(ex);
892
      }
880
///////////////////////////////////////////////////////////////////////////////////////////////////
881

  
882
  void setLibInterface(ObjectLibInterface inter)
883
    {
884
    mInterface = inter;
893 885
    }
894 886

  
895 887
///////////////////////////////////////////////////////////////////////////////////////////////////
......
1132 1124
    if( !mTexture.setTexture(bitmap) )
1133 1125
      {
1134 1126
      int max = DistortedLibrary.getMaxTextureSize();
1135
      FirebaseCrashlytics crashlytics = FirebaseCrashlytics.getInstance();
1136
      crashlytics.log("failed to set texture of size "+bitmap.getWidth()+"x"+bitmap.getHeight()+" max is "+max);
1127
      mInterface.reportProblem("failed to set texture of size "+bitmap.getWidth()+"x"+bitmap.getHeight()+" max is "+max);
1137 1128
      }
1138 1129
    }
1139 1130

  

Also available in: Unified diff