Revision e847c553
Added by Leszek Koltunski about 2 years ago
src/main/java/org/distorted/dialogs/RubikDialogUpdateView.java | ||
---|---|---|
41 | 41 |
import org.distorted.screens.RubikScreenPlay; |
42 | 42 |
import org.distorted.screens.ScreenList; |
43 | 43 |
|
44 |
import static org.distorted.main.RubikActivity.SHOW_DOWNLOADED_DEBUG; |
|
45 |
|
|
44 | 46 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
45 | 47 |
|
46 | 48 |
public class RubikDialogUpdateView implements RubikNetwork.Downloadee |
... | ... | |
125 | 127 |
RubikFiles files = RubikFiles.getInstance(); |
126 | 128 |
mIconSaved = files.saveIcon(act,mInfo.mIcon, name); |
127 | 129 |
|
128 |
android.util.Log.e("D", "Saving icon "+name+" to a file "+mIconSaved); |
|
130 |
if( SHOW_DOWNLOADED_DEBUG ) android.util.Log.e("D", "Saving icon "+name+" to a file "+mIconSaved);
|
|
129 | 131 |
} |
130 | 132 |
} |
131 | 133 |
|
... | ... | |
193 | 195 |
Activity act = mAct.get(); |
194 | 196 |
oSuccess = files.saveFile(act,mInfo.mObjectStream, name); |
195 | 197 |
|
196 |
android.util.Log.e("D", "Saving JSON "+name+" to a file "+oSuccess); |
|
198 |
if( SHOW_DOWNLOADED_DEBUG ) android.util.Log.e("D", "Saving JSON "+name+" to a file "+oSuccess);
|
|
197 | 199 |
|
198 | 200 |
JsonReader reader = JsonReader.getInstance(); |
199 | 201 |
mInfo.mNumScrambles = reader.readNumScrambles(act,name); |
200 | 202 |
|
201 |
android.util.Log.e("D", "Read from JSON numScrambles="+mInfo.mNumScrambles); |
|
203 |
if( SHOW_DOWNLOADED_DEBUG ) android.util.Log.e("D", "Read from JSON numScrambles="+mInfo.mNumScrambles);
|
|
202 | 204 |
} |
203 | 205 |
|
204 | 206 |
if( mInfo.mExtrasStream!=null ) |
... | ... | |
207 | 209 |
Activity act = mAct.get(); |
208 | 210 |
eSuccess = files.saveFile(act,mInfo.mExtrasStream, name); |
209 | 211 |
|
210 |
android.util.Log.e("D", "Saving Extras "+name+" to a file "+eSuccess); |
|
212 |
if( SHOW_DOWNLOADED_DEBUG ) android.util.Log.e("D", "Saving Extras "+name+" to a file "+eSuccess);
|
|
211 | 213 |
} |
212 | 214 |
|
213 | 215 |
if( mIconSaved || oSuccess || eSuccess ) |
214 | 216 |
{ |
215 | 217 |
makeProgress(75,R.string.configuring); |
216 | 218 |
|
217 |
android.util.Log.e("D", "1"); |
|
219 |
if( SHOW_DOWNLOADED_DEBUG ) android.util.Log.e("D", "1");
|
|
218 | 220 |
|
219 | 221 |
RubikObjectList.addDownloadedObject(mInfo.mObjectShortName,mInfo.mNumScrambles, mInfo.mObjectMinorVersion, |
220 | 222 |
mInfo.mExtrasMinorVersion, mIconSaved, oSuccess, eSuccess); |
221 | 223 |
|
222 |
android.util.Log.e("D", "2"); |
|
224 |
if( SHOW_DOWNLOADED_DEBUG ) android.util.Log.e("D", "2");
|
|
223 | 225 |
|
224 | 226 |
RubikNetwork network = RubikNetwork.getInstance(); |
225 | 227 |
network.updateDone(mInfo.mObjectShortName); |
226 | 228 |
|
227 |
android.util.Log.e("D", "3"); |
|
229 |
if( SHOW_DOWNLOADED_DEBUG ) android.util.Log.e("D", "3");
|
|
228 | 230 |
|
229 | 231 |
RubikScreenPlay play = (RubikScreenPlay)ScreenList.PLAY.getScreenClass(); |
230 | 232 |
play.recreatePopup(); |
231 | 233 |
|
232 |
android.util.Log.e("D", "4"); |
|
234 |
if( SHOW_DOWNLOADED_DEBUG ) android.util.Log.e("D", "4");
|
|
233 | 235 |
|
234 | 236 |
makeProgress(100,R.string.success); |
235 | 237 |
|
236 |
android.util.Log.e("D", "5"); |
|
238 |
if( SHOW_DOWNLOADED_DEBUG ) android.util.Log.e("D", "5");
|
|
237 | 239 |
} |
238 | 240 |
else |
239 | 241 |
{ |
Also available in: Unified diff
Make 'downloaded' debugs controlled by a single boolean.