diff options
author | Torsten Grote <t@grobox.de> | 2022-06-20 14:12:24 -0300 |
---|---|---|
committer | Torsten Grote <t@grobox.de> | 2022-06-20 14:12:24 -0300 |
commit | 0450b57c2d2104226196878a9e7217fe6eb3730e (patch) | |
tree | bdb498f62fb17b651effdda1df8038f3817564f2 /anastasis-ui/src/main/java | |
parent | 5b7bb5cf012fc41b2fbb6a41f6f858009c1ba092 (diff) | |
download | taler-android-0450b57c2d2104226196878a9e7217fe6eb3730e.tar.gz taler-android-0450b57c2d2104226196878a9e7217fe6eb3730e.tar.bz2 taler-android-0450b57c2d2104226196878a9e7217fe6eb3730e.zip |
Fix lint and CI issues
Note that I only fixes the most grave things that made things fail.
I didn't address all issues introduces lately
nor making sure the targetSdk bump to 32 has no unintented side-effects.
Diffstat (limited to 'anastasis-ui/src/main/java')
-rw-r--r-- | anastasis-ui/src/main/java/org/gnu/anastasis/ui/authentication/SmsFragment.kt | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/anastasis-ui/src/main/java/org/gnu/anastasis/ui/authentication/SmsFragment.kt b/anastasis-ui/src/main/java/org/gnu/anastasis/ui/authentication/SmsFragment.kt index 413f472..2c35309 100644 --- a/anastasis-ui/src/main/java/org/gnu/anastasis/ui/authentication/SmsFragment.kt +++ b/anastasis-ui/src/main/java/org/gnu/anastasis/ui/authentication/SmsFragment.kt @@ -25,7 +25,7 @@ import android.view.LayoutInflater import android.view.View import android.view.ViewGroup import androidx.annotation.RequiresPermission -import androidx.core.content.ContextCompat +import androidx.core.content.ContextCompat.checkSelfPermission import androidx.core.content.getSystemService import androidx.fragment.app.Fragment import androidx.fragment.app.activityViewModels @@ -35,7 +35,6 @@ import com.google.android.material.transition.MaterialContainerTransform.FADE_MO import org.gnu.anastasis.ui.MainViewModel import org.gnu.anastasis.ui.PERMISSION_REQUEST_CODE import org.gnu.anastasis.ui.R -import org.gnu.anastasis.ui.databinding.FragmentSecurityQuestionBinding import org.gnu.anastasis.ui.databinding.FragmentSmsBinding private const val PERMISSION = Manifest.permission.READ_PHONE_STATE @@ -52,7 +51,7 @@ class SmsFragment : Fragment() { override fun onCreateView( inflater: LayoutInflater, container: ViewGroup?, - savedInstanceState: Bundle? + savedInstanceState: Bundle?, ): View? { _binding = FragmentSmsBinding.inflate(inflater, container, false) sharedElementEnterTransition = MaterialContainerTransform().apply { @@ -79,8 +78,7 @@ class SmsFragment : Fragment() { } private fun checkPerm() = when { - ContextCompat.checkSelfPermission(requireContext(), PERMISSION) - == PERMISSION_GRANTED -> { + checkSelfPermission(requireContext(), PERMISSION) == PERMISSION_GRANTED -> { // You can use the API that requires the permission. fillPhoneNumber() } @@ -99,7 +97,7 @@ class SmsFragment : Fragment() { override fun onRequestPermissionsResult( requestCode: Int, permissions: Array<String>, - grantResults: IntArray + grantResults: IntArray, ) { if (requestCode == PERMISSION_REQUEST_CODE && grantResults.isNotEmpty() && grantResults[0] == PERMISSION_GRANTED |