Project

General

Profile

« Previous | Next » 

Revision 84d746d7

Added by Leszek Koltunski about 2 years ago

Downloaded Objects more or less work now.

View differences:

src/main/java/org/distorted/external/RubikUpdates.java
41 41
    public final int mIconPresent;
42 42
    public final boolean mUpdateObject;
43 43
    public final boolean mUpdateExtras;
44

  
45
    public int mNumScrambles;
44 46
    public Bitmap mIcon;
45 47
    public InputStream mObjectStream;
46 48
    public InputStream mExtrasStream;
......
59 61
      mUpdateExtras       = updateE;
60 62

  
61 63
      mIcon = null;
64
      mNumScrambles = 0;
62 65
      }
63 66
    }
64 67

  
......
115 118
      int objOrdinal = RubikObjectList.getOrdinal(shortName.toUpperCase());
116 119
      boolean updateO=true, updateE=true;
117 120

  
121
android.util.Log.e("D", "downloaded object "+shortName+" oMinor="+oMinor+" eMinor="+eMinor);
122

  
118 123
      if( objOrdinal>=0 )
119 124
        {
120 125
        int localObjectMinor = RubikObjectList.getLocalObjectMinor(objOrdinal);
121 126
        int localExtrasMinor = RubikObjectList.getLocalExtrasMinor(objOrdinal);
122 127
        updateO = localObjectMinor<oMinor;
123 128
        updateE = localExtrasMinor<eMinor;
129

  
130

  
131
android.util.Log.e("D", "object exists locally, localObjectMinor="+localObjectMinor+" localExtrasMinor="+localExtrasMinor);
132

  
124 133
        }
125 134
      if( updateO || updateE )
126 135
        {
127 136
        UpdateInfo info = new UpdateInfo(shortName,longName,description,oMinor,eMinor,oPercent,oIcon,updateO,updateE);
128
        if(oPercent>=100) mCompleted.add(info);
129
        else              mStarted.add(info);
137
        if(oPercent>=100)
138
          {
139
android.util.Log.e("D", "object added to completed");
140

  
141
          mCompleted.add(info);
142
          }
143
        else
144
          {
145
android.util.Log.e("D", "object added to started");
146

  
147
          mStarted.add(info);
148
          }
130 149
        }
131 150
      }
132 151
    }

Also available in: Unified diff