187 |
187 |
public static void addDownloadedObject(String shortName, int numScrambles, int objectMinor, int extrasMinor,
|
188 |
188 |
boolean icon, boolean object, boolean extras)
|
189 |
189 |
{
|
|
190 |
if( SHOW_DOWNLOADED_DEBUG ) android.util.Log.e("D", "New downloaded object "+shortName+" icon="+icon+" object="+object+" extras="+extras);
|
|
191 |
|
190 |
192 |
for( DownloadedObject obj : mDownloadedObjects )
|
191 |
193 |
{
|
192 |
194 |
if( obj.shortName.equals(shortName) )
|
... | ... | |
195 |
197 |
obj.object|= object;
|
196 |
198 |
obj.extras|= extras;
|
197 |
199 |
|
198 |
|
if( SHOW_DOWNLOADED_DEBUG ) android.util.Log.e("D", "Updating downloaded object "+shortName);
|
|
200 |
if( !obj.object ) objectMinor=-1;
|
|
201 |
if( !obj.extras ) extrasMinor=-1;
|
|
202 |
|
|
203 |
obj.objectMinor = objectMinor;
|
|
204 |
obj.extrasMinor = extrasMinor;
|
|
205 |
|
|
206 |
if( SHOW_DOWNLOADED_DEBUG ) android.util.Log.e("D", "Updating downloaded object "+shortName+" icon="+obj.icon+" object="+obj.object+" extras="+obj.extras);
|
199 |
207 |
|
200 |
208 |
return;
|
201 |
209 |
}
|
202 |
210 |
}
|
203 |
211 |
|
204 |
|
DownloadedObject extra = new DownloadedObject(shortName,numScrambles,objectMinor,extrasMinor,icon,object,extras);
|
205 |
|
if ( internalAddDownloadedObject(extra) )
|
|
212 |
if( !object ) objectMinor=-1;
|
|
213 |
if( !extras ) extrasMinor=-1;
|
|
214 |
|
|
215 |
DownloadedObject obj = new DownloadedObject(shortName,numScrambles,objectMinor,extrasMinor,icon,object,extras);
|
|
216 |
if ( internalAddDownloadedObject(obj) )
|
206 |
217 |
{
|
207 |
|
if( SHOW_DOWNLOADED_DEBUG ) android.util.Log.e("D", "Adding new downloaded object "+shortName);
|
208 |
|
mDownloadedObjects.add(extra);
|
|
218 |
if( SHOW_DOWNLOADED_DEBUG ) android.util.Log.e("D", "Adding new downloaded object "+shortName+" icon="+obj.icon+" object="+obj.object+" extras="+obj.extras);
|
|
219 |
mDownloadedObjects.add(obj);
|
209 |
220 |
}
|
210 |
221 |
}
|
211 |
222 |
|
Make it possible to automatically re-download EXTRAS file if it previously failed to download