-
Notifications
You must be signed in to change notification settings - Fork 107
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* release-2.5.6: Update version code and name for release 2.5.6 Translations: Squashed commit of the following: strings: add a proper set of duration names for future use CONTRIBUTING: translations PRs should be done to the translation branch circle.yml: disable coverage report for now Make PIN timeout actually work Make app lock timeout configurable PinLockActivity: make fingerprint work with the new pin verification model Privacy prefs: require PIN confirmation before PIN delete/modify StartActivity: close app if PIN input is canceled PinLockActivity: make the back button undo input if possible PinLockActivity: make PIN verification a result call as well Display that AEMPS database is from Spain. Update kotlin version to 1.2.50 Update gradle plugin to 3.1.3
- Loading branch information
Showing
27 changed files
with
938 additions
and
132 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 0 additions & 44 deletions
44
Calendula/src/main/java/es/usc/citius/servando/calendula/activities/StartActivity.java
This file was deleted.
Oops, something went wrong.
68 changes: 68 additions & 0 deletions
68
Calendula/src/main/java/es/usc/citius/servando/calendula/activities/StartActivity.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
/* | ||
* Calendula - An assistant for personal medication management. | ||
* Copyright (C) 2014-2018 CiTIUS - University of Santiago de Compostela | ||
* | ||
* Calendula is free software; you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation; either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this software. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
package es.usc.citius.servando.calendula.activities | ||
|
||
|
||
import android.app.Activity | ||
import android.content.Intent | ||
import android.os.Bundle | ||
|
||
import es.usc.citius.servando.calendula.HomePagerActivity | ||
import es.usc.citius.servando.calendula.pinlock.PINManager | ||
import es.usc.citius.servando.calendula.pinlock.PinLockActivity | ||
import es.usc.citius.servando.calendula.pinlock.UnlockStateManager | ||
|
||
|
||
class StartActivity : Activity() { | ||
|
||
companion object { | ||
const val EXTRA_RETURN_TO_PREVIOUS = "StartActivity.extras.return_to_previous" | ||
} | ||
|
||
override fun onCreate(savedInstanceState: Bundle?) { | ||
super.onCreate(savedInstanceState) | ||
verifyUnlockAndLaunch() | ||
} | ||
|
||
private fun verifyUnlockAndLaunch() { | ||
if (PINManager.isPINSet() && !UnlockStateManager.getInstance().isUnlocked) { | ||
val i = Intent(this, PinLockActivity::class.java) | ||
i.action = PinLockActivity.ACTION_VERIFY_PIN | ||
startActivityForResult(i, PinLockActivity.REQUEST_VERIFY) | ||
} else { | ||
val returnToPrevious = intent.getBooleanExtra(EXTRA_RETURN_TO_PREVIOUS,false) | ||
if (!returnToPrevious) { | ||
// if "return to previous" is specified, just finish this activity to go back in the stack | ||
startActivity(Intent(this, HomePagerActivity::class.java)) | ||
} | ||
finish() | ||
} | ||
} | ||
|
||
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) { | ||
super.onActivityResult(requestCode, resultCode, data) | ||
if (requestCode == PinLockActivity.REQUEST_VERIFY) { | ||
if (resultCode == Activity.RESULT_CANCELED) { | ||
finish() | ||
} else { | ||
verifyUnlockAndLaunch() | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.