Skip to content
This repository has been archived by the owner on Apr 15, 2020. It is now read-only.

added uzbek localization #214

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 7 additions & 8 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
apply plugin: 'com.android.application'

android {
compileSdkVersion 26
buildToolsVersion '26.0.2'
compileSdkVersion 28

defaultConfig {
applicationId "com.github.orangegangsters.lollipin"
minSdkVersion 14
targetSdkVersion 24
targetSdkVersion 28
versionCode 1
versionName "1.0"
}
Expand All @@ -20,16 +19,16 @@ android {
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
implementation fileTree(dir: 'libs', include: ['*.jar'])

compile project(':lib')
compile 'com.android.support:appcompat-v7:26.0.2'
implementation project(':lib')
implementation 'com.android.support:appcompat-v7:26.1.0'

//Lollipop dialogs https://github.com/lewisjdeane/L-Dialogs and buttons, animations etc...
compile 'uk.me.lewisdeane.ldialogs:ldialogs:1.2.0@aar'
implementation 'uk.me.lewisdeane.ldialogs:ldialogs:1.2.0@aar'

//test
androidTestCompile 'com.jayway.android.robotium:robotium-solo:5.5.2'
androidTestImplementation 'com.jayway.android.robotium:robotium-solo:5.5.2'
}

// REQUIRED: Google's new Maven repo is required for the latest
Expand Down
3 changes: 2 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@
buildscript {
repositories {
jcenter()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.3'
classpath 'com.android.tools.build:gradle:3.4.2'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
Expand Down
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Mon Apr 17 11:56:01 PDT 2017
#Wed May 22 14:25:45 UZT 2019
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-5.1.1-all.zip
17 changes: 8 additions & 9 deletions lib/build.gradle
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
apply plugin: 'com.android.library'

android {
compileSdkVersion 26
buildToolsVersion '26.0.1'
compileSdkVersion 28

defaultConfig {
minSdkVersion 14
targetSdkVersion 26
targetSdkVersion 28
versionCode 2
versionName VERSION_NAME
}
Expand All @@ -19,16 +18,16 @@ android {
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
implementation fileTree(dir: 'libs', include: ['*.jar'])
//RippleView
compile 'com.github.traex.rippleeffect:ripple:1.3.1-OG'
implementation 'com.github.traex.rippleeffect:ripple:1.3.1-OG'
//TypefaceView
compile 'com.github.omadahealth.typefaceview:typefaceview:1.5.0@aar' //TypefaceTextView
implementation 'com.github.omadahealth.typefaceview:typefaceview:1.5.0@aar' //TypefaceTextView

//Compat
compile 'com.android.support:support-v4:26.0.2'
compile 'com.android.support:appcompat-v7:26.0.2'
compile "com.android.support:support-v13:26.0.2"
implementation 'com.android.support:support-v4:28.0.0'
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation "com.android.support:support-v13:28.0.0"
}
repositories {
maven {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,9 +143,10 @@ private void initLayoutForFingerprint() {
if (mType == AppLock.UNLOCK_PIN && Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
mFingerprintManager = (FingerprintManager) getSystemService(Context.FINGERPRINT_SERVICE);
mFingerprintUiHelper = new FingerprintUiHelper.FingerprintUiHelperBuilder(mFingerprintManager).build(mFingerprintImageView, mFingerprintTextView, this);
mFingerprintUiHelper.setSuccessDelayMillis(getSuccessDelayMillis());
try {
if (mFingerprintManager.isHardwareDetected() && mFingerprintUiHelper.isFingerprintAuthAvailable()
&& mLockManager.getAppLock().isFingerprintAuthEnabled()) {
if (mFingerprintManager.isHardwareDetected() && mFingerprintUiHelper.isFingerprintAuthAvailable()
&& mLockManager.getAppLock().isFingerprintAuthEnabled()) {
mFingerprintImageView.setVisibility(View.VISIBLE);
mFingerprintTextView.setVisibility(View.VISIBLE);
mFingerprintUiHelper.startListening();
Expand All @@ -157,13 +158,25 @@ private void initLayoutForFingerprint() {
Log.e(TAG, e.toString());
mFingerprintImageView.setVisibility(View.GONE);
mFingerprintTextView.setVisibility(View.GONE);
} catch (NullPointerException e) {
Log.e(TAG, e.toString());
mFingerprintImageView.setVisibility(View.GONE);
mFingerprintTextView.setVisibility(View.GONE);
} catch (Exception e) {
Log.e(TAG, e.toString());
mFingerprintImageView.setVisibility(View.GONE);
mFingerprintTextView.setVisibility(View.GONE);
}
} else {
mFingerprintImageView.setVisibility(View.GONE);
mFingerprintTextView.setVisibility(View.GONE);
}
}

public long getSuccessDelayMillis(){
return FingerprintUiHelper.DEFAULT_SUCCESS_DELAY_MILLIS;
}

/**
* Re enable {@link AppLock} if it has been collected to avoid
* {@link NullPointerException}.
Expand Down Expand Up @@ -218,8 +231,12 @@ public String getForgotText() {
return getString(R.string.pin_code_forgot_text);
}

private void setForgotTextVisibility(){
mForgotTextView.setVisibility(mLockManager.getAppLock().shouldShowForgot(mType) ? View.VISIBLE : View.GONE);
private void setForgotTextVisibility() {
if(mType == AppLock.ENABLE_PINLOCK){
mForgotTextView.setVisibility(View.GONE);
}else{
mForgotTextView.setVisibility(mLockManager.getAppLock().shouldShowForgot(mType) ? View.VISIBLE : View.GONE);
}
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,9 @@ public class FingerprintUiHelper extends FingerprintManager.AuthenticationCallba
/**
* The timeout for the success to be displayed. Calls {@link Callback#onAuthenticated()} after this.
*/
private static final long SUCCESS_DELAY_MILLIS = 1300;
public static final long DEFAULT_SUCCESS_DELAY_MILLIS = 1300;

private long successDelayMillis = DEFAULT_SUCCESS_DELAY_MILLIS;
/**
* Alias for our key in the Android Key Store
**/
Expand Down Expand Up @@ -209,7 +211,15 @@ public void onAuthenticationSucceeded(FingerprintManager.AuthenticationResult re
public void run() {
mCallback.onAuthenticated();
}
}, SUCCESS_DELAY_MILLIS);
}, successDelayMillis);
}

public void setSuccessDelayMillis(long delay){
this.successDelayMillis = delay;
}

public long getSuccessDelayMillis(){
return successDelayMillis;
}

/**
Expand Down
12 changes: 12 additions & 0 deletions lib/src/main/res/values-uz/strings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="pin_code_fingerprint_not_recognized">Barmoq izi aniqlanmadi. Qayta urinib ko\'ring</string>
<string name="pin_code_fingerprint_success">Barmoq izi aniqlandi</string>
<string name="pin_code_fingerprint_text">Barmoq izi</string>
<string name="pin_code_forgot_text">Parolni unutdingizmi?</string>
<string name="pin_code_step_change">%d xonali pinkodingizni kiriting</string>
<string name="pin_code_step_create">%d xonali pinkodingizni yarating</string>
<string name="pin_code_step_disable">%d xonali pinkodingizni o\'chirib qo\'ying</string>
<string name="pin_code_step_enable_confirm">%d xonali pinkodingizni tasdiqlang</string>
<string name="pin_code_step_unlock">%d xonali pinkodingizni kiriting</string>
</resources>