Skip to content

Commit

Permalink
Refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
viniciusthiengo committed Nov 14, 2016
1 parent 80e929a commit f3fd15c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public void run() {

private void loadWebViewDataSupport( String srcBase64 ){

if( Util.isPreLollipop() ){
if( Util.isPreKitKat() ){
String postData = null;
try {
postData = "image="+ URLEncoder.encode(srcBase64, "UTF-8");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public void generateBase64(){
@Override
public void run() {

if( !Util.isPreLollipop() ){
if( !Util.isPreKitKat() ){
Bitmap bitmap = generateBitmap();

ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
package br.com.thiengo.webviewusersignup.extras;

import android.os.Build;

/**
* Created by viniciusthiengo on 13/11/16.
*/

public class Util {
public static boolean isPreLollipop(){
public static boolean isPreKitKat(){
int currentapiVersion = android.os.Build.VERSION.SDK_INT;
return currentapiVersion < android.os.Build.VERSION_CODES.LOLLIPOP;
return currentapiVersion < Build.VERSION_CODES.KITKAT;
}
}

0 comments on commit f3fd15c

Please sign in to comment.