diff options
| author | zeapo <mohamed@zenadi.com> | 2017-10-30 22:37:07 +0100 |
|---|---|---|
| committer | zeapo <mohamed@zenadi.com> | 2017-10-30 22:37:07 +0100 |
| commit | d697b6a46c494e130624050dc9da2c7139cb1aa1 (patch) | |
| tree | 326f2002716dafe1c924d7a6ad94b9dbb88a534c /app/src/main/java/com/zeapo/pwdstore/UserPreference.kt | |
| parent | e85cd2297bdeeaef265b2c825367cd33608f9bc5 (diff) | |
| download | HardenedPass-d697b6a46c494e130624050dc9da2c7139cb1aa1.tar.gz HardenedPass-d697b6a46c494e130624050dc9da2c7139cb1aa1.zip | |
code cleanup & refactor
Diffstat (limited to 'app/src/main/java/com/zeapo/pwdstore/UserPreference.kt')
| -rw-r--r-- | app/src/main/java/com/zeapo/pwdstore/UserPreference.kt | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/src/main/java/com/zeapo/pwdstore/UserPreference.kt b/app/src/main/java/com/zeapo/pwdstore/UserPreference.kt index 39d6fe48..3e9b2c4c 100644 --- a/app/src/main/java/com/zeapo/pwdstore/UserPreference.kt +++ b/app/src/main/java/com/zeapo/pwdstore/UserPreference.kt @@ -272,7 +272,7 @@ class UserPreference : AppCompatActivity() { * @param reason The text to be shown to the user to explain why we're requesting this permission * @param body The function to run */ - fun runWithPermissions(requestedPermission: String, requestCode: Int, reason: String, body: () -> Unit): Unit { + private fun runWithPermissions(requestedPermission: String, requestCode: Int, reason: String, body: () -> Unit): Unit { if (ContextCompat.checkSelfPermission(this, requestedPermission) != PackageManager.PERMISSION_GRANTED) { if (ActivityCompat.shouldShowRequestPermissionRationale(this, requestedPermission)) { val snack = Snackbar.make(prefsFragment.view, @@ -283,7 +283,7 @@ class UserPreference : AppCompatActivity() { } snack.show() val view = snack.view - val tv = view.findViewById(android.support.design.R.id.snackbar_text) as TextView + val tv = view.findViewById<TextView>(android.support.design.R.id.snackbar_text) tv.setTextColor(Color.WHITE) tv.maxLines = 10 } else { @@ -310,7 +310,7 @@ class UserPreference : AppCompatActivity() { /** * Exports the passwords */ - fun exportPasswords(): Unit { + private fun exportPasswords(): Unit { val i = Intent(applicationContext, FilePickerActivity::class.java) // Set these depending on your use case. These are the defaults. |
