Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

minor bug fixed #1786

Merged
merged 1 commit into from
Feb 20, 2021
Merged
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
3 changes: 2 additions & 1 deletion mifosng-android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ android {
abortOnError false
disable 'InvalidPackage'
disable 'MissingTranslation'
disable 'OutdatedLibrary'
}


Expand Down Expand Up @@ -218,7 +219,7 @@ dependencies {


implementation "com.joanzapata.iconify:android-iconify-material:2.1.1" // (v2.0.0)
implementation('com.crashlytics.sdk.android:crashlytics:17.2.2@aar') {
implementation('com.crashlytics.sdk.android:crashlytics:2.6.6@aar') {
transitive = true
}
implementation 'com.amulyakhare:com.amulyakhare.textdrawable:1.0.1'
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
package com.mifos.mifosxdroid

import android.os.Bundle
import android.preference.Preference.OnPreferenceChangeListener
import android.preference.PreferenceFragment
import android.preference.SwitchPreference
import com.mifos.mifosxdroid.dialogfragments.syncsurveysdialog.SyncSurveysDialogFragment
import com.mifos.utils.FragmentConstants

/**
* Created by mayankjindal on 22/07/17.
*/
class SettingsFragment : PreferenceFragment() {
var mEnableSyncSurvey: SwitchPreference? = null
override fun onCreate(savedInstanceState: Bundle) {
super.onCreate(savedInstanceState)
addPreferencesFromResource(R.xml.preferences)
mEnableSyncSurvey = findPreference(resources.getString(R.string.sync_survey)) as SwitchPreference
mEnableSyncSurvey!!.onPreferenceChangeListener =
OnPreferenceChangeListener { preference, newValue ->
if (newValue as Boolean) {
val syncSurveysDialogFragment = SyncSurveysDialogFragment.newInstance()
val fragmentTransaction = fragmentManager.beginTransaction()
fragmentTransaction.addToBackStack(FragmentConstants.FRAG_SURVEYS_SYNC)
syncSurveysDialogFragment.isCancelable = false
syncSurveysDialogFragment.show(fragmentTransaction,
resources.getString(R.string.sync_clients))
}
true
}
}

companion object {
fun newInstance(): SettingsFragment {
val fragment = SettingsFragment()
val args = Bundle()
fragment.arguments = args
return fragment
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,10 @@ protected void createLocationRequest() {
}

protected void startLocationUpdates() {
if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {
if (ActivityCompat.checkSelfPermission(this, Manifest.permission
.ACCESS_FINE_LOCATION) != PackageManager
.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, Manifest
.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {
// TODO: Consider calling
// ActivityCompat#requestPermissions
// here to request the missing permissions, and then overriding
Expand All @@ -117,7 +120,11 @@ protected void startLocationUpdates() {
// for ActivityCompat#requestPermissions for more details.
return;
}
if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {
if (ActivityCompat.checkSelfPermission(this, Manifest.permission
.ACCESS_FINE_LOCATION) != PackageManager
.PERMISSION_GRANTED && ActivityCompat
.checkSelfPermission(this, Manifest.permission
.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {
// TODO: Consider calling
// ActivityCompat#requestPermissions
// here to request the missing permissions, and then overriding
Expand Down Expand Up @@ -149,7 +156,11 @@ public int onStartCommand(Intent intent, int flags, int startId) {
@Override
public void onConnected(Bundle bundle) {
if (currentLocation == null) {
if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {
if (ActivityCompat.checkSelfPermission(this, Manifest
.permission.ACCESS_FINE_LOCATION) != PackageManager
.PERMISSION_GRANTED && ActivityCompat
.checkSelfPermission(this, Manifest.permission
.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {
// TODO: Consider calling
// ActivityCompat#requestPermissions
// here to request the missing permissions, and then overriding
Expand All @@ -159,7 +170,11 @@ public void onConnected(Bundle bundle) {
// for ActivityCompat#requestPermissions for more details.
return;
}
if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {
if (ActivityCompat.checkSelfPermission(this, Manifest
.permission.ACCESS_FINE_LOCATION) != PackageManager
.PERMISSION_GRANTED && ActivityCompat
.checkSelfPermission(this, Manifest.permission
.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {
// TODO: Consider calling
// ActivityCompat#requestPermissions
// here to request the missing permissions, and then overriding
Expand Down