diff --git a/app/src/main/java/de/felixnuesse/timedsilence/fragments/CheckupFragment.kt b/app/src/main/java/de/felixnuesse/timedsilence/fragments/CheckupFragment.kt
index 7ffdd86..bbe7f13 100644
--- a/app/src/main/java/de/felixnuesse/timedsilence/fragments/CheckupFragment.kt
+++ b/app/src/main/java/de/felixnuesse/timedsilence/fragments/CheckupFragment.kt
@@ -26,6 +26,7 @@ import androidx.fragment.app.Fragment
import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView
import de.felixnuesse.timedsilence.databinding.FragmentCheckupBinding
+import de.felixnuesse.timedsilence.handler.PreferencesManager
import de.felixnuesse.timedsilence.model.contacts.Contact
import de.felixnuesse.timedsilence.model.contacts.ContactUtil
import de.felixnuesse.timedsilence.ui.ContactsListAdapter
@@ -196,6 +197,7 @@ class CheckupFragment : Fragment() {
adapter = viewAdapter
}
+ binding.checkupChangeRingerWarningContainer.visibility = if(PreferencesManager(requireContext()).changeRingerVolume()) View.VISIBLE else View.GONE
}
/**
diff --git a/app/src/main/java/de/felixnuesse/timedsilence/handler/volume/VolumeHandler.kt b/app/src/main/java/de/felixnuesse/timedsilence/handler/volume/VolumeHandler.kt
index 5f123f9..f403eee 100644
--- a/app/src/main/java/de/felixnuesse/timedsilence/handler/volume/VolumeHandler.kt
+++ b/app/src/main/java/de/felixnuesse/timedsilence/handler/volume/VolumeHandler.kt
@@ -148,15 +148,14 @@ class VolumeHandler(private var mContext: Context, private var mInstanceContext:
notifcationVolume
)
- if(mPreferencesManager.changeRingerVolume()){
- Log.d(TAG(), "VolumeHandler - $mInstanceContext: STREAM_RING: $ringerVolume")
- Log.d(TAG(), "VolumeHandler - $mInstanceContext: Setting Ringer! This might be not what you want!")
- setStreamToPercent(
- manager,
- AudioManager.STREAM_RING,
- ringerVolume
- )
- }
+
+ // If we set the device to loud, this is exactly what we want.
+ Log.d(TAG(), "VolumeHandler - $mInstanceContext: STREAM_RING: $ringerVolume")
+ setStreamToPercent(
+ manager,
+ AudioManager.STREAM_RING,
+ ringerVolume
+ )
}
diff --git a/app/src/main/res/layout/fragment_checkup.xml b/app/src/main/res/layout/fragment_checkup.xml
index 28e9635..7935544 100644
--- a/app/src/main/res/layout/fragment_checkup.xml
+++ b/app/src/main/res/layout/fragment_checkup.xml
@@ -7,14 +7,51 @@
android:layout_height="match_parent"
tools:context=".fragments.CheckupFragment">
+
+
+
+
+
+
+
+
+
-
-
+ app:layout_constraintTop_toTopOf="parent">
Select how your phone should react
Calendars
Select to wich calendar should apply
+ You are changing the ringer volume. This is likely not what you want!