Bug Fix: thumb is null

Bug Fix: Floating Button in upload Land
This commit is contained in:
Schoumi 2016-02-24 13:21:57 +01:00
parent 74d51dcaa7
commit 15564d1b49
2 changed files with 2 additions and 10 deletions

View File

@ -216,7 +216,8 @@ public class NetworkManager {
String token = msg.getString("token"); String token = msg.getString("token");
String thumb = msg.getString("thumb"); String thumb = msg.getString("thumb");
//get thumbnail and transform it to useful data //get thumbnail and transform it to useful data
thumb = thumb.substring(thumb.indexOf(",")); if(thumb != null && thumb.contains(","))
thumb = thumb.substring(thumb.indexOf(","));
byte[] thumbData = Base64.decode(thumb, Base64.DEFAULT); byte[] thumbData = Base64.decode(thumb, Base64.DEFAULT);
System.out.println("Data is not null? " + thumbData.length); System.out.println("Data is not null? " + thumbData.length);
imgOutput = new Img(0, siteUrl, hashOutput, realHashOutput, Calendar.getInstance(), nbDays, thumbData,token); imgOutput = new Img(0, siteUrl, hashOutput, realHashOutput, Calendar.getInstance(), nbDays, thumbData,token);

View File

@ -110,13 +110,4 @@
</RelativeLayout> </RelativeLayout>
<android.support.design.widget.FloatingActionButton
android:id="@+id/new_image_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|end"
android:layout_margin="16dp"
android:src="@android:drawable/stat_sys_upload_done"
/>
</android.support.design.widget.CoordinatorLayout> </android.support.design.widget.CoordinatorLayout>