|
|
@ -5,6 +5,7 @@ import android.content.Intent; |
|
|
|
import android.graphics.Bitmap; |
|
|
|
import android.os.Bundle; |
|
|
|
|
|
|
|
import android.os.Handler; |
|
|
|
import android.os.Vibrator; |
|
|
|
import android.text.TextUtils; |
|
|
|
import android.util.Log; |
|
|
@ -115,7 +116,7 @@ public class AuthenticationActivity extends ToolbarActivity implements PinFragme |
|
|
|
|
|
|
|
// to make the Navigation drawer icon always appear on the action bar |
|
|
|
|
|
|
|
getActionBar().setDisplayHomeAsUpEnabled(true); |
|
|
|
// getActionBar().setDisplayHomeAsUpEnabled(true); |
|
|
|
|
|
|
|
login = getIntent().getStringExtra(USER_NAME); |
|
|
|
face = findViewById(R.id.face); |
|
|
@ -123,7 +124,11 @@ public class AuthenticationActivity extends ToolbarActivity implements PinFragme |
|
|
|
@Override |
|
|
|
public void onClick(View v) { |
|
|
|
System.out.println("Clicked face"); |
|
|
|
setSelectedTab(v); |
|
|
|
showFaceAuth(); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
}); |
|
|
|
/*if (TextUtils.isEmpty(login)) { |
|
|
|
finish(); |
|
|
@ -223,7 +228,7 @@ public class AuthenticationActivity extends ToolbarActivity implements PinFragme |
|
|
|
|
|
|
|
private void unselectTabs() { |
|
|
|
face.setActivated(false); |
|
|
|
finger.setActivated(false); |
|
|
|
// finger.setActivated(false); |
|
|
|
} |
|
|
|
|
|
|
|
private void setSelectedTab(View view) { |
|
|
@ -231,22 +236,25 @@ public class AuthenticationActivity extends ToolbarActivity implements PinFragme |
|
|
|
view.setActivated(true); |
|
|
|
} |
|
|
|
|
|
|
|
/*@OnClick({R.id.face}) |
|
|
|
@OnClick({R.id.face}) |
|
|
|
public void onFaceClick(View view) { |
|
|
|
System.out.println("Clicked face"); |
|
|
|
System.out.println("Clicked face1"); |
|
|
|
setSelectedTab(view); |
|
|
|
showFaceAuth(); |
|
|
|
}*/ |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void showFaceAuth() { |
|
|
|
System.out.println("Inside showFaceAuth"); |
|
|
|
preferences.setNeedPortrait(false); |
|
|
|
if (photoFragment == null) { |
|
|
|
photoFragment = PhotoFragment.newInstance(); |
|
|
|
photoFragment.setListener(this); |
|
|
|
photoFragment.setPhotoProcessor(photoProcessor); |
|
|
|
photoFragment.enableLivenessCheck(preferences.getLivenessAuth()); |
|
|
|
photoFragment.enableLivenessCheck(false); |
|
|
|
} |
|
|
|
preferences.setStartTime(String.valueOf(System.currentTimeMillis())); |
|
|
|
preferences.setNeedPortrait(true); |
|
|
|
showFragment(photoFragment); |
|
|
|
} |
|
|
|
|
|
|
|